fixed streamline benchmarks #1233

Merged
merged 2 commits into from Dec 29, 2016

Projects

None yet

5 participants

@bjouhier
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
Collaborator

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

@bjouhier
Contributor

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
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';
@lvivski
lvivski Sep 29, 2016 edited Contributor

Shouldn't it be relative, not hardcoded? There are several other places throughout the code that have it hardcoded

@bjouhier
bjouhier Sep 29, 2016 Contributor

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

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
Contributor

Should be ok now.

@petkaantonov petkaantonov merged commit c4b2a6e into petkaantonov:master Dec 29, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment