RFC: String Performance

Operations on strings in Retro are slow, due to the number of memory reads/writes needed to operate on them.

In #4 ~scott91e1 suggests adding an I/O device for hashing. I think it might be beneficial to go further.

In the Python implementation, we have shadow functions in the VM that transparently replace calls to words with native Python versions. This allows the Python VM to run significantly faster.

What I propose here is implementing this in the C version of the VM, as a compile#time option. This would allow for much faster operations in many cases, including hashing (#4), but not sacrifice general compatibility with the code written in Retro,

(I have some concern that if I introduce this as a new i/o device it'll break compatibility across VM implementations and make implementations more complex).

This would be disabled by default, but would require only a single build time flag to enable.

If deemed acceptable, I think this can be ready for the 2021.10 release.

Assigned to
1 year, 1 month ago
10 months ago
RFC discussion performance