Underscore's indexOf seems designed to give a JIT conniptions: isSorted arg can be undefined, a boolean, or an index to start searching at.
@littlecalculist Also, this API doesn't allow fast indexOf on a sorted array with a nonzero start index? Not convinced it's the best API.
-
-
@bz_moz Sure. I just wouldn't judge the API by its JITability. IMO JS engine optimizations should pay more attention to JS idioms. -
@littlecalculist Sure, as long as people realize that type-stable code is pretty much guaranteed to end up compiled to faster machine code. - 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.