Skip to content

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

Merged
merged 2 commits into from
Dec 29, 2016

Conversation

bjouhier
Copy link
Contributor

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.

@benjamingr
Copy link
Collaborator

Thanks! Is the code with all the switch/case the actual source code or a generated output?

@bjouhier
Copy link
Contributor Author

The source is the streamline._js file. The file with the big switch/case is produced by regenerator.

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...

@benjamingr
Copy link
Collaborator

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';
Copy link
Contributor

@lvivski lvivski Sep 29, 2016

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

Copy link
Contributor Author

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

@bambielli
Copy link

It appears that streamline-callbacks.js is now using a deprecated module. I get the following when I run your code:

The regenerator/runtime module is deprecated; please import regenerator-runtime/runtime instead.

@bjouhier
Copy link
Contributor Author

Should be ok now.

@petkaantonov petkaantonov merged commit c4b2a6e into petkaantonov:master Dec 29, 2016
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.

Benchmark for streamline broken
5 participants