-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fixed streamline benchmarks #1233
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
fixed streamline benchmarks #1233
Conversation
Thanks! Is the code with all the switch/case the actual source code or a generated output? |
The source is the The old callbacks algorithm was generating code that looked a bit better and was closer to the original source, but I got lazy when I reimplemented with babel and I just applied the regenerator transform on top of streamline's generators transform. Anyway, every JS engine supports generators these days... |
LGTM |
|
||
var _streamline = typeof require === 'function' ? require('streamline-runtime/lib/callbacks/runtime') : Streamline.require('streamline-runtime/lib/callbacks/runtime'); | ||
|
||
var _filename = '/Users/bruno/dev/bluebird/benchmark/doxbee-sequential-errors/streamline._js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be relative, not hardcoded? There are several other places throughout the code that have it hardcoded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right. It won't do much harm as it is only used to reconstruct stack frames.
I've entered an issue: Sage/streamlinejs#339
It appears that streamline-callbacks.js is now using a deprecated module. I get the following when I run your code:
|
Should be ok now. |
This PR fixes #1094. I have added the missing reference in benchmark/package.json.
I have also upgraded streamline to 2.0 and recompiled the files.
The streamline-callbacks bench is slower than before (and it is now slower than streamline-generators). This is because the streamline transform has been reimplemented with babel and the new transform uses regenerator instead of the original streamline algorithm.