Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
YouTube Security VideosAndroid Police: Samsung is smashing records! #shorts #tech #phones(21.09.2026 um 13:55 Uhr)
YouTube Security Videosheise & c't: Bundesnetzagentur wollte diesen Futterautomaten verbieten(21.09.2026 um 13:53 Uhr)
YouTube Security VideosNeil Patel: Your Google Traffic Isn't An Asset It's A Loan #shorts(21.09.2026 um 14:05 Uhr)
Windows Tipps & SecurityF-14 A Tomcat Top Gun endlich als Revell Klemmbausteinmodell erhältlich(21.09.2026 um 14:27 Uhr)
Sichere ProgrammierungShow the Hand-Back Sample Before Approving an Agent Score(21.09.2026 um 14:15 Uhr)
Sichere ProgrammierungHybrid retrieval in one Postgres query: RRF over tsvector + pgvector(21.09.2026 um 14:15 Uhr)
YouTube Security VideosAndroid Police: Samsung is smashing records! #shorts #tech #phones(21.09.2026 um 13:55 Uhr)
YouTube Security Videosheise & c't: Bundesnetzagentur wollte diesen Futterautomaten verbieten(21.09.2026 um 13:53 Uhr)
YouTube Security VideosNeil Patel: Your Google Traffic Isn't An Asset It's A Loan #shorts(21.09.2026 um 14:05 Uhr)
Windows Tipps & SecurityF-14 A Tomcat Top Gun endlich als Revell Klemmbausteinmodell erhältlich(21.09.2026 um 14:27 Uhr)
Sichere ProgrammierungShow the Hand-Back Sample Before Approving an Agent Score(21.09.2026 um 14:15 Uhr)
Sichere ProgrammierungHybrid retrieval in one Postgres query: RRF over tsvector + pgvector(21.09.2026 um 14:15 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How I Migrated My Language (Arc) from a Tree-Walker to a Bytecode VM in 7 Days

If you told me a year ago, when I first started learning how to code, that I would be writing a custom bytecode virtual machine, I would have laughed you out of the room. But after spending about 1.5 months building my programming…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

If you told me a year ago, when I first started learning how to code, that I would be writing a custom bytecode virtual machine, I would have laughed you out of the room.



But after spending about 1.5 months building my programming language, Arc, as a standard tree-walking interpreter, I hit a wall. Tree-walkers are elegant, but they are notoriously slow because they constantly traverse the Abstract Syntax Tree (AST) during execution.

I wanted speed. I wanted to understand how the big leagues (like Lua or Python) actually execute code. So, I decided to rip out the heart of Arc and replace it with a stack-based bytecode VM.



It was a wild 3-day sprint. Here is how it went down.






The Timeline






Day 1: The Valley of Despair





  • Status: Very tough day. Code is completely half-baked. Most things are broken.


  • The Reality: I underestimated bytecode. Turning an AST into a linear stream of instructions (opcodes) and operands is a massive mental shift. I spent hours wrestling with stack offsets and trying to emit correct bytecode. By the end of the day, the codebase was a graveyard of compiler errors. I went to bed questioning my life choices.






Day 2: It Works... But It's Slower?





  • Status: Basic support is finally there, but the VM is incredibly slow.


  • The Reality: The VM finally successfully executed its first program! The excitement lasted for exactly five seconds until I ran my benchmarks. The bytecode VM was slower at EVERYTHING... except for a recursive Fibonacci function. Why? Because the tree-walker had massive overhead for function calls, while my VM handled call frames a bit better. But for loops, math, and variable assignments? The VM was dragging its feet.






Day 3: The Optimization Breakthrough





  • Status: Optimizations kicked in. Matches the tree-walker, and smashes Fibonacci.


  • The Reality: Day 2's slowness was because of naive decoding loops. On Day 3, I tightened the main loop, used a flat array for the stack, and streamlined instruction decoding.


  • The Result: The bytecode VM is now neck-and-neck with the old tree-walking approach on basic scripts, and it absolutely annihilated the recursive fib(30) benchmark, running almost 500ms faster!






Day 4-7: Coming soon...






What is Next?



The core architecture is finally handling the heavy lifting, but the sprint is not over yet.

For the second half of the week, the focus shifts entirely to stability, refinement, and edge cases. Up next is tracking down some elusive memory leaks, hunting down edge-case bugs that crash the stack, and polishing the codebase so it is ready for prime time. Stay tuned for the next update.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How I Migrated My Language (Arc) from a Tree-Walker to a Bytecode VM in 7 Days

Thematisch verwandte Begriffe: Migrated, Language, from, TreeWalker · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94097 | A vulnerability was determined in Netcore NBR200V2 1.3.241127.071246. Th…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick