Open v0lkan opened 7 years ago
Hi @v0lkan. Thank you so much for the in-depth write-up, it's very helpful. The Tessel team is pretty spread out during the holidays, so there's been a bit of a delay in responding to this. We will be checking this out and would love to work with you on this in the New Year. :smile:
Hi @HipsterBrown, no worries; and happy new year!
It would be lovely to help make Tessel faster.
If we can enable v8 optimizations, that might even be a part of my (probably upcoming) Fluent 2017 tech talk on June 2017.
Excited and curious about how this issue will pan out.
Let me know if there’s anything I can do to help.
I have a Tessel 1, Tessel 2, a rasberry pi, an intel nuc, and a bunch of other gizmos that I can use as a guinea pig.
Cheers,
Volkan.
I’m not sure if this is the correct Github project; if it’s not feel free to guide me to the correct one.
It's not whether this is the correct place or not, it's whether there is anything we can actually do about it (besides investigate together). I'm not sure where the correct place would be—more on this to follow.
I suspect that the optimization bailout might be due to Tessel’s MIPS architecture ... why cannot Tessel’s v8 runtime Optimize JavaScript?
I found these, which are interesting:
I'm still digging, but I need to change gears for a few hours and didn't want to leave this unposted
Hey @HipsterBrown @rwaldron — do you have any update on this? — Will she live, doctor?
Sorry, I haven't made any progress here.
Summary
I’m not sure if this is the correct Github project; if it’s not feel free to guide me to the correct one.
Here’s what I’m doing:
1) Root into a Tessel 2 2)
vi 000_add.js
and save the following script into/
:3) Execute
node --trace-opt --trace-deopt --allow-natives-syntax 000_add.js
I get the following output on the console:
So v8 aborts optimization even with the simplest function without giving any reason (see the output after
---
)For reference if I run the same command in Raspberry Pi, I get the following output:
One thing that grabs my attention is I get a much shorter output in raspberry pi, although the script that I execute is identical. — And also raspberry pi properly optimizes the function.
I suspect that the optimization bailout might be due to Tessel’s MIPS architecture, though it would be lovely if a subject matter expert can chime in and enlighten on
Expectation
What happens: Tessel’s v8 runtime bails out optimization without giving a reason, even if it is explicitly forced to do the optimization.
Expectation: Tessel’s v8 runtime should optimize the called function.