2 karma · joined Apr 23, 2018 (8y ago) · 4 submissions
comment 7y ago · link · parent
comment 8y ago · link · parent
The amount of boxing and unboxing as you go through the various switches actually can ultimately make this much less efficient than the exception based flow. The code was ultimately something like 8 times as slow, and topped out CPU on beastly boxes which was surprising to me.
comment 8y ago · link · parent
When you're outside the FFI, the language really shines in build speed and output. Support of ES Modules out of the box is nice too.
comment 8y ago · link · parent
The series of if checks (O(n)) it generates as opposed to a switch statement can really add up in loops with bigger enums.
Of the langs listed, ReasonML/OCaml have the best codegen/ffi story, it’s relatively easy to drop them into existing JS projects.