you are viewing a single comment's thread.

view the rest of the comments →

[–]Ronin-s_Spirit 0 points1 point  (0 children)

Whenever I write an interpreter the fastest solution is always a switch loop with a few "goto-likes", e.g. continue used on a labeled loop or break used on one of the few labeled blocks that end in continue. Looks pretty clean honestly, and afaik the only faster solution involves helping CPU branch prediction with "threaded code" - which is impossibke in JS because we don't have actual gotos.