Skip to content

Entirely terraformed this project with a more efficient structure : bytecode interpretation.#2

Merged
dedalien merged 10 commits into
mainfrom
dev
Feb 18, 2026
Merged

Entirely terraformed this project with a more efficient structure : bytecode interpretation.#2
dedalien merged 10 commits into
mainfrom
dev

Conversation

@dedalien

Copy link
Copy Markdown
Owner

Check #1

dedalien and others added 10 commits February 1, 2026 21:32
BREAKING CHANGE: Replace AST evaluation with bytecode VM

- Add bytecode VM with stack-based architecture (~2μs execution time)
- Implement 18 opcodes (PUSH, LOAD_GLOBAL, OP_EQ, OP_IN, etc.)
- Support for int8/16/32, string, bool, and array types
- Optimized handlers using array lookup instead of switch
- Add Value.Compare() for unified comparisons
- Remove redundant opcodes (NEQ, NOT_CONTAINS) in favor of composition
- VM supports record loading and bytecode execution

Performance: ~10x faster at least than AST walking for repeated queries
Also refactored int and string with generic function
Enhanced AST and Parser with NOT support. Removed MATCHES Operator for this current version, will be implemented in further version.
Now use a vm with bytecode compilation and enhanced parser
New structure : VM bytecode and compiling
@dedalien dedalien merged commit fca5170 into main Feb 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant