frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

JIT-ing a stack machine (with SLJIT)

https://bullno1.com/blog/jiting-a-stack-machine
13•bullno1•3d ago

Comments

Rochus•3d ago
Very interesting article, thanks for sharing. I'm still considering using SLJIT for my Micron interpreter (https://github.com/rochus-keller/Micron), which is a stack machine as well; but given the relatively low speed-up I still doubt whether it's worthwhile. It should then also support some kind of debugger (not only for JIT development, but for the user of the jitted language), which is apparently not yet supported by SLJIT.
ivankra•53m ago
> The initial naive application didn’t even yield much gains. Only after a bunch of optimizations that it really shines: a 30-46% speedup compared to the computed goto interpreter.

It looks like quite a lot of complexity for such gain. 30-40% is roughly what context-threading would buy you [1]. It takes relatively little code to implement - only do honest assembly for jumps and conditional branches, for other opcodes just emit a call to interpreter's handler. Reportedly, it took Apple just 4k LOC to ship first JIT like that in JavaScriptCore [2].

Also, if you haven't seen it, musttail + preserve_none is a cool new dispatch technique to get more mileage out of plain C/C++ before turning to hand-coded assembly/JIT [3]. A step up from computed goto.

[1] https://webdocs.cs.ualberta.ca/~amaral/cascon/CDP05/slides/C...

[2] https://webkit.org/blog/214/introducing-squirrelfish-extreme...

[3] https://godbolt.org/z/TPozdErM5

alexisread•52m ago
In my spare time I'm looking at JIT from a different perspective.

https://github.com/dan4thewin/FreeForth2/tree/master

This is a Forth with a few tricks, namely using flow control instead of a compilation switch flag. This, always compiling into an eval buffer before execution, and use of macros, allows you to unroll a function/word/expression before execution, which makes it fast.

Macros can be used to do stack caching (though it doesn't here) and cross compilation etc.

Lastly, Freeforth caches the top two stack items in registers, so at compile time it avoids swap by register renaming.

This all is quite a different approach and somewhat language specific. Just wanted to highlight the variety, as uxn is not actually that far from forth and has such a different approach.

Statistical Physics with R: Ising Model with Monte Carlo

https://github.com/msuzen/isingLenzMC
42•northlondoner•3h ago•17 comments

Want to piss off your IT department? Are the links not malicious looking enough?

https://phishyurl.com/
750•jordigh•14h ago•207 comments

The Ruliology of Lambdas

https://writings.stephenwolfram.com/2025/09/the-ruliology-of-lambdas/
54•marvinborner•3d ago•11 comments

The Fisherman and His Wife (1857)

https://sites.pitt.edu/~dash/grimm019.html
43•andsoitis•2d ago•24 comments

Frying Eggs and Air Quality Tests

https://chillphysicsenjoyer.substack.com/p/frying-eggs-and-air-quality-tests
12•crescit_eundo•2d ago•13 comments

Rules for creating good-looking user interfaces, from a developer

https://weberdominik.com/blog/rules-user-interfaces/
206•domysee•3d ago•109 comments

The Sagrada Família takes its final shape

https://www.newyorker.com/magazine/2025/09/22/is-the-sagrada-familia-a-masterpiece-or-kitsch
300•pseudolus•3d ago•159 comments

Dynamo AI (YC W22) Is Hiring a Senior Kubernetes Engineer

https://www.ycombinator.com/companies/dynamo-ai/jobs/fU1oC9q-senior-kubernetes-engineer
1•DynamoFL•57m ago

Ruby Central's Attack on RubyGems [pdf]

https://pup-e.com/goodbye-rubygems.pdf
111•jolux•4h ago•10 comments

David Lynch LA House

https://www.wallpaper.com/design-interiors/david-lynch-house-los-angeles-for-sale
201•ewf•12h ago•78 comments

Apple: SSH and FileVault

https://keith.github.io/xcode-man-pages/apple_ssh_and_filevault.7.html
421•ingve•16h ago•151 comments

Help Us Raise $200k to Free JavaScript from Oracle

https://deno.com/blog/javascript-tm-gofundme
165•kaladin-jasnah•11h ago•83 comments

U.S. already has the critical minerals it needs, according to new analysis

https://www.minesnewsroom.com/news/us-already-has-critical-minerals-it-needs-theyre-being-thrown-...
190•giuliomagnifico•17h ago•238 comments

Leatherman (vagabond)

https://en.wikipedia.org/wiki/Leatherman_(vagabond)
154•redbell•4d ago•67 comments

Gemini in Chrome

https://gemini.google/overview/gemini-in-chrome/
213•angst•10h ago•186 comments

This map is not upside down

https://www.maps.com/this-map-is-not-upside-down/
299•aagha•19h ago•408 comments

Count Folke Bernadotte: Sweden's Servant of Peace (2010)

https://www.historytoday.com/archive/feature/count-folke-bernadotte-swedens-servant-peace
42•apollinaire•6h ago•27 comments

Tracking trust with Rust in the kernel

https://lwn.net/Articles/1034603/
115•pykello•4d ago•31 comments

Burnend alive inside a Tesla as rescuers fail to open the car's door

https://www.msn.com/en-us/autos/electric-cars/man-and-two-children-burn-alive-inside-a-tesla-with...
47•dsego•2h ago•30 comments

Playing “Minecraft” without Minecraft (2024)

https://lenowo.org/viewtopic.php?t=5
120•coolcoder613•10h ago•48 comments

Grief gets an expiration date, just like us

https://bessstillman.substack.com/p/oh-fuck-youre-still-sad
387•LaurenSerino•22h ago•184 comments

AI tools are making the world look weird

https://strat7.com/blogs/weird-in-weird-out/
142•gaaz•14h ago•130 comments

Llama-Factory: Unified, Efficient Fine-Tuning for 100 Open LLMs

https://github.com/hiyouga/LLaMA-Factory
98•jinqueeny•13h ago•14 comments

Slack has raised our charges by $195k per year

https://skyfall.dev/posts/slack
3088•JustSkyfall•1d ago•1340 comments

JIT-ing a stack machine (with SLJIT)

https://bullno1.com/blog/jiting-a-stack-machine
13•bullno1•3d ago•3 comments

Learn Your Way: Reimagining Textbooks with Generative AI

https://research.google/blog/learn-your-way-reimagining-textbooks-with-generative-ai/
323•FromTheArchives•19h ago•223 comments

Sylvia Plath's fig tree meets machine learning

https://dontlognow.substack.com/p/sylvia-plaths-fig-tree-meets-machine
17•batkin•3d ago•1 comments

Rupert's snub cube and other Math Holes

http://tom7.org/ruperts/
123•QuadmasterXLII•3d ago•7 comments

Nvidia buys $5B in Intel

https://www.tomshardware.com/pc-components/cpus/nvidia-and-intel-announce-jointly-developed-intel...
925•stycznik•1d ago•566 comments

iTerm2 Web Browser

https://iterm2.com/documentation-web.html
100•danielfalbo•5h ago•75 comments