4 ms·
How are strings represented in the VM? Is there a benchmark for string operations?
by shuffel 5y ago
How are strings represented in the VM? Is there a benchmark for string operations?
- shuffel 5y agoStrings appear to be represented as arrays with elements which are 4 bytes in size, with 30 numeric bits for each character: https://github.com/FastVM/minivm/blob/4906256b2dc16e227cad7ec8c1986fda1ce52b18/vm/type.h#L23-L32 https://github.com/FastVM/minivm/blob/4906256b2dc16e227cad7e... https://github.com/FastVM/minivm/blob/4906256b2dc16e227cad7ec8c1986fda1ce52b18/vm/vm.c#L293-L304 https://github.com/FastVM/minivm/blob/4906256b2dc16e227cad7e...