I’m not sure if this is the right place to ask this, but I’m seeing a very large, ~20x difference in JavaScript performance between Chrome and Firefox on a large JavaScript blob.
I have an OCaml playground running in the browser. It’s about ~20mb of JavaScript and contains most of the OCaml compiler. Chrome takes ~3s on first compile for any of the sample programs and Firefox ~57s. Subsequent compiles are ~1s for Chrome and ~20s for Firefox. If you select a sample from the drop-down and click “run” eventually some text in the top-right will show the compilation time.
I also captured a profile using https://profiler.firefox.com and there were extremely deep call stacks from the compilers type checker [probably because Js_of_ocaml failed to optimize the mutally recursive calls] which seemed to be where time was being spent. Also, I should note that once the programs are compiled they seem to run at comparable speeds in Chrome vs Firefox (at least the frame rate is similar).
I assume I’m hitting some edge case of SpiderMonkey. Are there any workarounds I could do?