ustr icon indicating copy to clipboard operation
ustr copied to clipboard

FFI functions should be implemented as inlined function in C/C++

Open qinix opened this issue 1 year ago • 0 comments

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.

qinix avatar Sep 16 '23 17:09 qinix