blog icon indicating copy to clipboard operation
blog copied to clipboard

Luke Gorrie's blog

Results 39 blog issues
Sort by recently updated
recently updated
newest added

I have started reading LuaJIT sources. I like the fact that the source code is compact and it is reasonable to print and read a whole file (or read it...

tech
luajit

Fight me: > Programming with a [tracing JIT](https://en.wikipedia.org/wiki/Tracing_just-in-time_compilation) is just like playing guitar with a looper pedal. First check out this (amazing) [guitar performance with a looper pedal on YouTube](https://www.youtube.com/watch?v=Lu7Zvjiq0nE)...

luajit
raptorjit

I was sad to hear that [Joe Armstrong passed away](https://twitter.com/FrancescoC/status/1119596234166218754) this week. He was a kind, generous, witty, brilliant fellow. He was also a hero and a mentor to me...

life

Here is a very rough thought experiment following the discussion of JIT-CPU mechanical sympathy in #30. Let's look at a tiny loop of assembler code: ``` loop: cmp rax, 0...

tech
luajit
raptorjit

Here is the bad news: - Learning to have [mechanical sympathy](https://mechanical-sympathy.blogspot.com/2011/07/why-mechanical-sympathy.html) for a modern CPU is hard. - Learning to have mechanical sympathy for a modern tracing JIT like RaptorJIT...

tech
luajit
raptorjit

Suppose you are writing a high-performance system program (network stack / hypervisor / database / unikernel / etc) and you want to write that in Lua with RaptorJIT or LuaJIT...

tech
luajit
raptorjit

In #27 we said that "every call to a Lua function is inlined, always, without exception." But what are these calls inlined *into*? What is the unit of compilation? A...

tech
luajit
raptorjit

In #26 we looked at what "speculative optimization" is in theory. Now we will take a look at the practice. To be clear: we will say that the compiler *speculates...

tech
luajit
raptorjit

Static C/C++ compilers optimize code based on what they can determine with certainty at compile time. For example, when compiling the code `a + b`, the compiler might think, >...

tech
luajit
raptorjit

We often think of code in static languages like C/C++ as being compiled into more specialized machine code than dynamic languages like Lua. This makes intuitive sense because source code...

tech
luajit
raptorjit