2 ms·
Actually a lot of string stuff is just calling into C, and can be as fast a C (and often is).
by coldtea 6y ago
Actually a lot of string stuff is just calling into C, and can be as fast a C (and often is).
- jashmatthews 6y agoJust calling into C doesn't give the performance you’re after a lot of the time. The compiler needs to be aware of the properties of strings. Usually they're implemented as either dedicated opcodes or intrinsics. You can see the simple ones in LuaJIT here https://github.com/LuaJIT/LuaJIT/blob/ff1e72acead01df7d8ed0fbb31efd32f57953618/src/lj_ffrecord.c#L745 https://github.com/LuaJIT/LuaJIT/blob/ff1e72acead01df7d8ed0f...