4 ms·
Thanks for the example! I assume the identical performance just comes from the optimization of the JIT, as allocating objects in the heap seems quite overkill
by aastronaut 4y ago
Thanks for the example!
I assume the identical performance just comes from the optimization of the JIT, as allocating objects in the heap seems quite overkill for such a control flow. I only fall back to this when switch/case isn't available in the language, eg. in Python.
Is this a thing in the JS community?