nibi-lang / nibi

An interpreted list processing language inspired by Lisp
GNU Affero General Public License v3.0
3 stars 2 forks source link

Update builtin handling to minimize jumps #119

Closed bosley closed 1 year ago

bosley commented 1 year ago

Create an enum for all builtins. Update function router to intake to embed these enums in a "builtin" cell. Then, merge all functions implemented into a switch statement within interpreter. With this, we will only have to branch off to functions that are user-defined.

Its hard to say if this will give any performance benefits, but its worth exploring.