Hacker News new | ask | show | jobs
by revelation 4843 days ago
What possible optimization would a compiler be able to do, given that arrays are only ever implicit in compiled C?
1 comments

If it knows the address is valid, it can use a speculative load. If it knows there are enough entries, it can use a wide load. Without that knowledge, such instructions could trigger SEGV due to an invalid pointer or the wide load spilling over a page boundary.