News for hackers. Stuff that matters.
Re:Writing a minimal x86-64 JIT compiler in C++, Part 2 by userbinator on Sunday January 14, 2018 @11:42AM (#16144931)
This is what I'd consider a "minimal x86 JIT": https://news.ycombinator.com/item?id=8746054 ;-)

It's interesting to note that JIT compilation is, for restricted inputs, not much different than self-modifying code. I've used the latter technique several times over the years to get impressive performance boosts, and it doesn't even have to be all that complex --- turning variables into constants and embedding them into immediates in instructions provides the best speedup, especially in tight loops, since it saves a register and/or memory access. Think of a video or image codec --- things like frame sizes, bit depth options, etc. don't change throughout the stream, so "JIT'ing" them with SMC really helps.

Re:Writing a minimal x86-64 JIT compiler in C++, Part 2 by kodablah on Sunday January 14, 2018 @10:42AM (#16144682)
I found this series also enlightening, especially if you're curious about the LLVM route: https://eli.thegreenplace.net/2017/adventures-in-jit-compila... (see parts 2 and 3)
Re:Writing a minimal x86-64 JIT compiler in C++, Part 2 by bootcat on Sunday January 14, 2018 @11:16AM (#16144842)
Thanks, really useful site and article !
Re:Writing a minimal x86-64 JIT compiler in C++, Part 2 by spc476 on Sunday January 14, 2018 @09:25PM (#16148016)
DynASM is an interesting tool (it's used in LuaJIT). I used it to test integer overflow overhead [1] (mainly because I could specify different expression lengths and test `INTO` vs. `JO`).

[1] http://boston.conman.org/2015/09/05.2 http://boston.conman.org/2015/09/07.1

Re:Writing a minimal x86-64 JIT compiler in C++, Part 2 by PatchMonkey on Wednesday January 17, 2018 @12:10AM (#16165637)
How well does [this](https://youtu.be/dkZ9zdSRQYM) or [that](https://youtu.be/tf09vULK7sw) still apply?

I'm still perfectly satisfied to remove anything like that from my system. There's even ebuilds out there to install full-featured web browsers without including JIT.

Re:Writing a minimal x86-64 JIT compiler in C++, Part 2 by bootcat on Sunday January 14, 2018 @09:52AM (#16144456)
Amazing but simple explanation. Really allowed me to grasp JIT.