r/javascript • • 3d ago

Writing a primitive Forth in JavaScript

https://www.onirom.fr/wiki/blog/16-11-2024_writing_a_primitive_forth_in_javascript/
5 Upvotes

2 comments sorted by

1

u/Ronin-s_Spirit 2d ago

Why do you have a loop to search for word definitions? That's incredibly expensive compared to using a hashmap.

•

u/r-chris_38 10h ago

A Map may help, but calling a linear scan incredibly expensive depends on the dictionary size and how often words are looked up.