4 ms·
You aren't modifying the same object When you have a fat pointer, llvm can tell you are modifying the ptr, bot the vtable You can then cache the function call
by ayende 5y ago
You aren't modifying the same object
When you have a fat pointer, llvm can tell you are modifying the ptr, bot the vtable
You can then cache the function call
When your vtable is in the object you are mutating, it needs to read each time
- celeritascelery 5y agoDoes LLVM do the inline caching itself? Or does it just enable zig to do this optimization?
- ayende 5y agoWhat happens is likely that the code gen can do the virtual lookup once, instead on each loop iteration This is llvm, bit zig