Live data from Hacker News

HolyJit: A New Hope

blog.mozilla.org

111–120 of 219 posts

Re: HolyJit: A New Hope

#111
On a similar note, I have been watching this[0] project which provides an IR to target and optional optimizations. But I like the idea that the only difference between a JIT and an AOT compiler is optimization choice (assuming we don't include tracing as part of the JIT features).

Also, this[1] blog series is a must-read for interested beginners.

0 - https://github.com/stoklund/cretonne/ 1 - https://eli.thegreenplace.net/2017/adventures-in-jit-compila...

Re: HolyJit: A New Hope

#113
post #112

36000 lines of handwritten assembler in v8? Not since the transition to ignition and turbofan... $ git clone https://github.com/v8/v8.git $ cd v8 $ find . -name '*.S' There's still some macro assembler in the built-in's but it's emitted rather than being assembler.

For both SpiderMonkey and v8, this is counting the number of calls to the MacroAssembler. SpiderMonkey commonly use the prefix "masm", while v8 uses the macro "__ " to alias the MacroAssembler.

The MacroAssembler, is basically what is used to produce assembly code in both JavaScript engines.

Re: HolyJit: A New Hope

#114

On a similar note, I have been watching this[0] project which provides an IR to target and optional optimizations. But I like the idea that the only difference between a JIT and an AOT compiler is optimization choice (assuming we don't include tracing as part of the JIT features). Also, this[1] blog series is a must-read for interested beginners. 0 - https://github.com/stoklund/cretonne/ 1 - https://eli.thegreenplace…

It sounds more than likely that HolyJit will use Cretonne as a backend.

For the moment it uses dynasm, just to get the prototype working, but I expect to change that in the upcoming months.

(I am the author of HolyJit)

Re: HolyJit: A New Hope

#115
post #108
post #94

Earlier quoted context omitted.

Government site. There doesn't have to be a reason.

I hope they are paying you very well.

Government site. They aren't paying James well.

Added: if you think I'm joking or being unfair, just look at the compensation tables for just about any government outfit. They top out around a salary that is considered average for software folks in some places.

Re: HolyJit: A New Hope

#116
This seems really cool! I know it's been mentioned before that there are no plans to rewrite SpiderMonkey in Rust, but this sort of feels like a tiny first step in that direction?

Almost reminds me of early on in Servo's history: https://news.ycombinator.com/item?id=6268521

(Although I may just be projecting what I want to hear :) it's exciting hearing about new Rust projects, especially new stuff going into Firefox.)

Re: HolyJit: A New Hope

#118
post #31
post #9

Earlier quoted context omitted.

I believe the fundamental difference is that instead of hand-writing snippets of assembly which their JIT can append, they are having the Rust compiler generate the assembly snippets from Rust code. This lets them be much more confident that they wrote the snippets correctly, and lets them spend much less time writing the snippets so they can focus on optimizations.

... and the snippets are used for the interpreter, which gives you more confidence that interpreted and JITed code behave the same (if I understood it correctly).

I believe you’re correct. Unless there is a compiler bug, the JIT and interpreted code will have the same semantics.

Re: HolyJit: A New Hope

#119
post #58
post #39

For what it's worth, the name is obviously a pun and a small wink to the Graal VM [1]. Not sure there's any intention to reference TempleOS's HolyC. [1] https://github.com/graalvm/

It could also be a play on the phrase "Holy shit!"

Both the reference to the GraalVM and a pun are intentional.

Re: HolyJit: A New Hope

#120

No offense, but the blog post is seriously missing a better (or any?) explanation of what's the new JIT all about. At first I even thought my browser loaded only half the page...

I'm truly sorry that GitHub is blocked where you work. Here's the pitch, taken from the repo's README [1]: 1) holyjit aims to be easy: > As a user, this implies that to inline a function in JIT compiled code, one just need to annotate it with the jit! macro. jit!{ fn eval(script: &Script, args: &[Value]) -> Result = eval_impl in script.as_ref() } fn eval_impl(script: &Script, args: &[Value]) -> Result { // ... // ...…

Thanks! That should be the blog post. Sounds like a very cool project.

It's funny that the current tiny non-informative blog post starts with a "tl;dr". Maybe it should be "ts; du" instead!

Post reply on HN