Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mikemike
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
mikemike
3mo ago
I'm not sure one can infer anything from a single failed Mozilla project. 'Real-world' JavaScript is a challenge for any compiler, no matter the underlying technology. The technical debt in SpiderMonkey (at that time, anyway)
2.
▲
by
mikemike
3mo ago
Trace compilation is NOT a dead end. LuaJIT works just fine. On big programs. On hundreds of millions of servers and devices. I find it deeply saddening that even scholars keep repeating this trope. Ignorance is bliss.
3.
▲
by
mikemike
5mo ago
To illustrate this, here's the contorted Lua code from https://news.ycombinator.com/item?id=11327201 local t = setmetatable({}, { __index = pcall, __newindex = rawset, __call = function(t, i) t[i] = 4
4.
▲
by
mikemike
5mo ago
As the open source author in question, I'd politely ask everyone to not draw overly-generic conclusions from an ancient discussion in some third-party forum, which links to a (now) resolved bug report. Open source is not a one-way stre
5.
▲
by
mikemike
2y ago
A good read if you want to learn (more than you ever wanted) about stack frame unwinding in conjunction with a JIT compiler. The only correction I have: LuaJIT _does_ have 64 bit integers, e.g. 0x0123456789abcdefLL.
6.
▲
A Walk with LuaJIT
(polarsignals.com)
20 points
by
mikemike
2y ago
|
2 comments
7.
▲
by
mikemike
3y ago
This is conjecture. OTOH I measured while I designed the LuaJIT IR. 1. An array index is just as suitable as a pointer for dereferencing. 2. What matters is how many dereferences are needed and their locality. 3. Data structure density is
8.
▲
by
mikemike
4y ago
I had already changed the title after your reply. The objection is about the naming, which implies an invention claim without further explanation. It's not about the code.
9.
▲
by
mikemike
4y ago
You may want to clarify that in the GitHub repo, too. See my issue there. If you want to go the didactic route, then consider documenting the improvements over the naive implementation: register hinting, register priorities (PHI), two-heade
10.
▲
by
mikemike
4y ago
Uh? This *is* the LuaJIT register allocator. Period. Code published 2009. Description published here: https://lua-users.org/lists/lua-l/2009-11/msg00089.html (ignore the TLS cert error). Coming up with a sill
11.
▲
by
mikemike
5y ago
That's what I'm wondering, too, right now. It's trivial to DoS-hang redis with the script feature (and SCRIPT KILL won't help). And I found at least 3 DoS-crash, because it hasn't backported fixes to its copy of Lua
12.
▲
by
mikemike
5y ago
Yes, of course it's vulnerable, verified with Docker debian:sid. That was my first reaction when I read this, but I wanted to verify it first. You beat me with this post. Since you've already let the cat out of the hat (which is n
13.
▲
by
mikemike
5y ago
One year ago I hardened LuaJIT's VM against these kind of attacks. Since then, there has been a constant influx of complaints and issues filed. All bitterly complaining their code, which mistakenly assumed a fixed hash table iteration
14.
▲
by
mikemike
9y ago
Actually, LuaJIT 1.x is just that: a translator from a register-based bytecode to machine code using templates (small assembler snippets) with fixed register assignment. There's only a little bit more magic to that, like template varia
15.
▲
by
mikemike
10y ago
Notable recent use of DynASM: Zend is using it to write a JIT compiler for PHP 8.0. http://externals.io/thread/268#email-12706-body
16.
▲
by
mikemike
10y ago
No. You DO need a good understanding of a computer language and of JIT compilers to understand the code base for any just-in-time compiler for that computer language. LuaJIT is not a toy compiler from a textbook. There's a lot of inher
17.
▲
by
mikemike
10y ago
This is a wrong perception. There is/was no shortage of sponsorships. I had to turn down most of these offers, due to time constraints.
18.
▲
by
mikemike
10y ago
Just in case, anyone has somehow gotten to the conclusion that Lua's semantics are 'simple', they should closely inspect this example and try to figure out through which contortions the VM has to go to make this work: l
19.
▲
by
mikemike
11y ago
By definition, a trace doesn't have internal branches. The solution is to use Hyperblock Scheduling. This is an extra pass that merges multiple traces, e.g. the described root trace and its side trace. The result is a single trace with
20.
▲
by
mikemike
11y ago
Thank you for taking the time to perform these tests! One thing that people advocating FDO often forget: this is statically tuning the code for a specific use case. Which is not what you want for an interpreter that has many, many code path
21.
▲
by
mikemike
13y ago
Oh, great! Thank you very much!
22.
▲
by
mikemike
13y ago
Oh, well ... pasting my standard rant on this: This is a common misinterpretation of the Dynamo paper: they compiled their C code at the lowest optimization level and then ran the (suboptimal) machine code through Dynamo. So there was act
23.
▲
by
mikemike
13y ago
To give credit, where credit is due: the original work on trace compilation is much, much older. The paper you cited is an application. The fundamental papers to hunt for are Joseph A. Fisher's publications on trace scheduling (sadly,
24.
▲
by
mikemike
13y ago
Err, the title of this item is a bit misleading, although it's the subject of the posting on the mailing list. One cannot explain it all in a single post. I just answered some specific questions, omitting most details.
25.
▲
by
mikemike
13y ago
Most of the sponsors who wished to remain anonymous didn't want their competition to know they use LuaJIT. :-)
26.
▲
by
mikemike
13y ago
Adding to that: For many applications, pure power consumption isn't even the best metric anymore. Due to advances in on-chip power and clock distribution, the energy x delay product and overall silicon efficiency have gained more importance
27.
▲
by
mikemike
13y ago
Thanks for the references! I'll have a read over the weekend. The problem with textual data-flow programming languages is that I haven't seen any that aren't ugly beyond repair.
28.
▲
by
mikemike
13y ago
Converting to SSA form is comparatively easy. The interesting question is how pure a particular SSA variant actually is (hint: almost none are in practice). Just the fact that a language is closer to SSA form doesn't make it interesting.
29.
▲
by
mikemike
14y ago
LUAJIT_ENABLE_CHECKHOOK edit: ditto.
30.
▲
by
mikemike
14y ago
<rant> Oh, well ... The Lua port of Richards I've seen is naive and nobody within his right mind would write Lua code like that. As has been pointed out elsewhere, Richards is a very atypical benchmark and different implementation s
More ›