News for hackers. Stuff that matters.
Re:Memory Safe Languages in Android 13 by berkut on Thursday December 01, 2022 @04:23PM (#33822983)
In the HPC / offline graphics / simulation world, there's lots of things like sparse arrays / grids, where you index into compacted grids and iterators wouldn't be that practical in that scenario (i.e. one single item, although for things like filtering with surrounding cells they can still be useful sometimes), and bounds checks do make a bit of a difference there (it's definitely measureable above the noise threshold), and due to the random nature of the data, the branch predictors don't help avoid the overhead.
Re:Memory Safe Languages in Android 13 by stouset on Thursday December 01, 2022 @04:26PM (#33823024)
Sure, I know there's paradigms where manual indexing is important. GP asked for an example where bounds-checking could be eliminated in Rust, so I gave the first one I thought of.