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

Performance improvement #24

Merged
merged 2 commits into from
May 19, 2016
Merged

Performance improvement #24

merged 2 commits into from
May 19, 2016

Conversation

marcbachmann
Copy link
Collaborator

  • Split up getter and setter.
  • Don’t modify pointers, use faster array operations.
  • Only apply untilde when necessary.

- Split up getter and setter.
- Don’t modify pointers, use faster array operations.
- Only apply untilde when necessary.
@janl
Copy link
Owner

janl commented May 2, 2016

looks good, did you run any benchmarks you could share?

@marcbachmann
Copy link
Collaborator Author

marcbachmann commented May 2, 2016

I did something on jsperf. But that's down. 😢
I can do some in here.

@marcbachmann
Copy link
Collaborator Author

marcbachmann commented May 11, 2016

on node v4

// master
get first level property: 414ms
get second level property: 639ms
get third level property: 783ms
set first level property: 426ms
set second level property: 678ms
set third level property: 1187ms
push property into array: 1168ms
[Finished in 5.4s]

// performance-improvements
get first level property: 167ms
get second level property: 256ms
get third level property: 299ms
set first level property: 163ms
set second level property: 236ms
set third level property: 577ms
push property into array: 673ms
[Finished in 2.5s]

on node v6 (i thought it got faster 😕 )

get first level property: 178.211ms
get second level property: 266.474ms
get third level property: 340.245ms
set first level property: 179.469ms
set second level property: 279.020ms
set third level property: 819.007ms
push property into array: 751.263ms
[Finished in 2.9s]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants