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

simplify interface #21

Closed
wants to merge 13 commits into from
Closed

simplify interface #21

wants to merge 13 commits into from

Conversation

semibran
Copy link

Addresses #16 and #20.

@jwagner
Copy link
Owner

jwagner commented Mar 14, 2018

Hello semibran,

While the interface you propose is elegant it has significant drawbacks:

  • It breaks backwards compatibility
  • It is significantly slower (~20% according for noise2D to a quick run of the benchmark)

The interface of simplex-noise.js has been designed in this way for a reason, monomorphic code is nearly always faster in javascript. See [https://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism.html](What's up with monomorphism?) for some more details on that.

So while I appreciate your effort this is not the direction I want to take this library in.

There are places where elegance trumps performance and practicality so it could be a great idea to create a javascript library based on simplex-noise that just implements the simplified interface on top of it.

@jwagner jwagner closed this Mar 14, 2018
@jwagner jwagner mentioned this pull request Mar 14, 2018
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