ustr
ustr copied to clipboard
FFI functions should be implemented as inlined function in C/C++
Currently, extern functions ustr_len
and ustr_hash
involve an extern function call, which is usually much slower compared to inlined function in C, considering inlined functions like these can be optimized as a direct pointer access on compilation.
Since the layout of StringCacheEntry
and char_ptr
is guranteed and ustr_len
is frequently used, I think that should be easily to implement as an inlined function.