Closed notgull closed 7 months ago
@dfrg When you have a chance can you take a look at this?
Yes, thanks. This looks good. The benchmark doesn't touch the modified AdaptiveStorage
since it uses Scratch
but I'm less concerned about that than the temporary arc storage for curves and if we're not seeing regressions there then I'm happy to remove the unsafe and address potential performance issues with the adaptive storage later.
In the rasterizer, arrays of data are gradually initialized by creating an uninitialized array and writing into those arrays. However, this is technically unsound in Rust, and causes MIRI to fail when I try to run on it.
Out of curiousity, I tried switching it to zeroing the array first before writing to it. However, by some benchmarks I wrote it seems to have no effect on the speed of the system. So I think it's a viable solution to reduce undefined behavior.