Bob Nystrom 4e87680dd1 feat: add optional computed gotos support for ~5% interpreter speedup
Introduce a `COMPUTED_GOTOS` preprocessor flag in `src/common.h` that, when defined, replaces the interpreter's traditional `for(;;) switch(instruction)` dispatch loop with a computed-goto dispatch table using GCC/LLVM labels-as-values extension. The new implementation defines a static `dispatchTable[]` array mapping opcodes to their corresponding `&&code_*` labels, and uses `DISPATCH()` macro to `goto` the next handler directly. When `COMPUTED_GOTOS` is not defined, the fallback retains the original `switch`-based loop. This change yields approximately a 5% performance improvement in benchmarks, though optimal GCC performance may require additional flags like `-fno-gcse`.
2013-11-25 05:48:27 +00:00
S
Description
Highly customized version of the wren programming language. It has all the modules that you would expect in a std library including http, websockets, sqlite3 and jinja-like templating engine. The idea is to make it suitable for web development.
22 MiB
Languages
HTML 50%
C 22.2%
PHP 13.4%
C++ 6%
Makefile 2.9%
Other 5.5%