235 karma · joined April 5, 2016
Example: the best order to run a sequence of instructions could depend on which inputs happen to be in the L1 cache at the time. This could differ from one execution to the next. There's no way for a static compiler to get this right.
The operation of FENCE.I scares me a little:
> FENCE.I does not ensure that other RISC-V harts’ instruction fetches will observe the local hart’s stores in a multiprocessor system. To make a store to instruction memory visible to all RISC-V harts, the writing hart has to execute a data FENCE before requesting that all remote RISC-V harts execute a FENCE.I
Yikes. That sounds cumbersome for multithreaded code patching systems, like modern JIT compilers. (A "hart" here is a hardware thread.) Sounds like all threads must poll periodically to check whether they should run a FENCE.I, and when they do so, they report that they've done it. Doesn't sound like a lot of fun to implement, though maybe better in software than hardware?
This article gives a series of examples that break that promise.
Only trouble is that once people find patterns like this, they have a habit of disappearing. Hopefully this one is based on solid enough fundamental market forces that it persists after its publication. It was published in 2013 so we won't know for sure until after 2023.
But John Wick Chapter 2 is not a period piece. The VIC-20 is not meant to be a modern computer there. As I recall, they have women dressed as 1940s switchboard operators with prominent tattoos using VIC-20 keyboards connected to modern monitors to take orders for assassination of assassins -- tell me again which part of this seems out of place?
My mistake--I thought "regions" meant some sort of interprocedural "code regions".
I suspect the state of the art in GC has moved in the last 15 years since this paper was written, and they might have trouble beating modern techniques, but that's speculation.
Nothing's impossible I guess, but this kind of global datastructure reshaping is definitely far beyond the state of the art in Java JIT compilers.
Java has two fundamentally different kinds of types: objects and primitives. Value types are user-defined primitives. Seems pretty straightforward, from a language design perspective. I'm not sure why we're trying so hard to avoid this.
I worked for years on escape analysis in IBM's Java JIT compiler. We struggled to find any actual programs that showed any benefit at all. The real benefits of escape analysis were second-order effects like eliminating monitor operations on non-escaping objects, or breaking apart objects and putting their fields into registers (especially autoboxed primitives). The actual stack allocation wasn't really any faster than heap allocation, and a GC operation in the nursery doesn't even look at dead objects.
EA is basically a microbenchmark-killer. For real software, it's not often worth the trouble.
Bzzz, wrong answer. This is too naive to be workable. It implies you need to drop out of your language in order to _build_ those functional components.