3 ms·
How about reading N-15 fast (assuming varints can be as small as a byte) and the rest with bounds-checking? Is N generally too small for that to be useful? Yo
by benlivengood 6y ago
How about reading N-15 fast (assuming varints can be as small as a byte) and the rest with bounds-checking? Is N generally too small for that to be useful?
You might also be able to heuristically compare buffer address modulo the page size to N to know whether you need to be safe or not.