pinaraf
Re:Oops It's a kernel stack use-after-free: Exploiting Nvidia's GPU Li...
on Wednesday October 15, 2025 @12:59PM (#45595466)
And the latest driver available for Jetson Thor doesn't have the fixes for these two CVEs because they decided to fork their own driver...
JIT: So you want to be faster than an interpreter on modern CPUs
Re:Look ma, I wrote a new JIT compiler for PostgreSQL
on Monday March 18, 2024 @06:54PM (#39751041)
The real difference is in the possible optimizations. If you consider the full scope of JIT compilation in for instance a web browser or the JVM, you could use copy and patch as a tier 0 compiler, and once really hot paths are identified, trigger a complete compiler with all the optimizer steps. Some optimizations are more complicated to implement with copy-patch, esp. if you can't use all the tricks described in the paper (for instance they use the ghccc calling convention to get a much finer register allocation, but from the documentation I don't think it's going to make it for PostgreSQL).
But as you say, yes, this enables people capable of writing C and reading assembly (or you have to be perfect and never have to go into gdb on your compiled code), and it makes the job so much faster and easier... Writing several machine code emitters is painful, and having the required optimization strategies for each ISA is quickly out of reach.
Re:Look ma, I wrote a new JIT compiler for PostgreSQL
on Monday March 18, 2024 @10:04AM (#39744716)
Yeah, well, sorry, I should have been more explicit here: the issue is with PostgreSQL, not LLVM. The JIT compiler has to inject direct memory addresses, making the generated code specific to your query and process.
Re:Look ma, I wrote a new JIT compiler for PostgreSQL
on Monday March 18, 2024 @10:02AM (#39744690)
Same for me, that's why I did this after finding out this research paper. With the proper compiler settings and small tricks you can remove some parts and already end up faster than the interpreter (because you remove some branches and a few memory accesses) and it's even possible to create "super-stencils" covering typical opcodes series and optimizing them further. Or the opposite, "sub-stencils" in order to do some loop unrolling for instance.
Re:Look ma, I wrote a new JIT compiler for PostgreSQL
on Monday March 18, 2024 @09:49AM (#39744480)
Indeed, and right now it's the only possible way since it remains in a single session, doing otherwise would be very hard.
Re:Look ma, I wrote a new JIT compiler for PostgreSQL
on Monday March 18, 2024 @09:38AM (#39744324)
Honestly I thought the same as you, then I wrote this, and I now understand it's going to be really hard to do. To make it very simple: there are pointers to query parts "leaking" everywhere across the execution engine. Removing them will require a significant overall of the execution engine, the planner and who knows what else. Even in a single session, two compiled queries will have different compiled code because of that (both llvm and my copyjit have to inject the adresses of various structs in asm code)
Re:Look ma, I wrote a new JIT compiler for PostgreSQL
on Monday March 18, 2024 @09:35AM (#39744269)
Two parts: I did the benchmark on a laptop and didn't spend enough time forcing its runtime PM in a fixed state, I'll run a real pgbench on my desktop once I implement all required opcodes for it. And since JIT requires a minimum amount of time (about 300us on my tests), on such small runtimes this can quickly overcome the benefits.
Re:Look ma, I wrote a new JIT compiler for PostgreSQL
on Monday March 18, 2024 @09:09AM (#39743917)
Author here. Thanks for submitting my article on hackernews. I'll do my best to answer any question.
PostgreSQL – Using Row Level Security with a Django Application
Re:Bi-Directional Replication for PostgreSQL v1.0
on Friday August 12, 2016 @01:42PM (#12277397)
PostgreSQL streaming : send disk diffs over network, raw binary, absolutely unusable if you don't have the same postgresql version on the other side
Logical : send data diffs over network. Could be used for replication, but also audit or sending to different databases...
Re:PyPy gets funding from Mozilla for Python 3.5 support
on Tuesday August 09, 2016 @03:26PM (#12257134)
Static checking ? Python 3.5
Asyncio ? Python 3.4
If these had been available in Python 3.2 or even better 3.0, the switch would have been far easier for corporate users that need benefits before accepting the cost of change...
Re:PyPy gets funding from Mozilla for Python 3.5 support
on Tuesday August 09, 2016 @03:14PM (#12257060)
Well, it weights in favor of Python 2, and considering that until recently the incencitives for Python 3 were still light...
It's not really about having users, but having the possibility of switching from CPython to PyPy if you face performance issues.
Re:Gh-ost: GitHub's online schema migration tool for MySQL
on Monday August 01, 2016 @02:37PM (#12204791)
So much work where there are many other solutions out there that don't have that limitation : PostgreSQL, several NoSQL databases...
Re:Ask HN: What OS do you run?
on Sunday April 19, 2015 @10:44AM (#9403299)
Debian sid, what else...
On desktop, laptop, servers...
Tools : QtCreator / KDevelop for C++, Netbeans for Java, vim or Kate for everything else