Hacker News new | past | comments | ask | show | jobs | submit login

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.


…but (barring a sufficiently advanced compiler) that also means the JITted code can’t use data structures that are wildly different from those used in the interpreter. For example, if integers are boxed in the interpreter, the JITted code would use boxed integers, too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: