Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT compilers optimization - JS #518

Open
mihaiberq opened this issue Feb 2, 2018 · 0 comments
Open

JIT compilers optimization - JS #518

mihaiberq opened this issue Feb 2, 2018 · 0 comments
Assignees

Comments

@mihaiberq
Copy link
Contributor

mihaiberq commented Feb 2, 2018

Add a new insight/workout on JIT compilers, based on: https://hacks.mozilla.org/2017/02/a-crash-course-in-just-in-time-jit-compilers/

Fun optimization consequence:

This is (a lot) faster:

myFunction({ x: '1', a: true, b: undefined, c: undefined, d: undefined })
myFunction({ x: '1', a: undefined, b: true, c: undefined, d: undefined })
myFunction({ x: '1', a: undefined, b: undefined, c: true, d: undefined })
myFunction({ x: '1', a: undefined, b: undefined, c: undefined, d: true })

Than this:

myFunction({ x: '1', a: true })
myFunction({ x: '1', b: true })
myFunction({ x: '1', c: true })
myFunction({ x: '1', d: true })
@mihaiberq mihaiberq self-assigned this Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant