ocsigen / js_of_ocaml

Compiler from OCaml to Javascript.
http://ocsigen.org/js_of_ocaml/
Other
953 stars 186 forks source link

Compiler: compact indirect call #1647

Closed hhugo closed 2 months ago

hhugo commented 2 months ago

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#direct_and_indirect_eval

vouillon commented 2 months ago

Have you benchmarked this? From what I remember, it was slower. See https://github.com/ocsigen/js_of_ocaml/pull/1397#issuecomment-1420979002

hhugo commented 2 months ago

Have you benchmarked this? From what I remember, it was slower. See #1397 (comment)

I've done some quick benchmark and it was slower to use E.call(null). Maybe we need more testing here.

hhugo commented 2 months ago

@vouillon, in case you want to play with some smallbenchmarks https://jsperf.app/test-call-vs-apply/93