4 ms·
Did you do anything special to make the CPU happy/efficient with forth function calls? I heard a rumor that CPUs find it hard to predict branches with code that
by 0xdeadbeefbabe 7y ago
Did you do anything special to make the CPU happy/efficient with forth function calls? I heard a rumor that CPUs find it hard to predict branches with code that doesn't do C calling conventions.
- codr7 7y agoOne of the main motivations in this case is embedding in C++, rather than trying to replace it. So far the language is implemented as a high level VM/interpreter, I'm planning to eventually emit C++ to get standalone executables and a 20-30% speed up. So no, I didn't do anything :) It's all C++, all the way. I suspect most standard Forths don't give a crap about the CPU, they like to implement everything themselves.