eliassjogreen · GitHub

First off, wow! You bit off a big piece and chewed it down like it wasn't even a problem!

The code seems to be perfectly correct already, and in that sense would be mergeable. However, there were some minor points about integer to double conversions, and Agent mutability things. Those should be fixed.

Then there's a larger thing about squishing down the size of a DataView. We can get it down to just 4 bytes (8 bytes with backing object) for the new DataView(ab) case, or perhaps 12 bytes (16 with backing object) if we want to avoid a performance cliff for new DataView(ab, 1, 2) kind of cases.

If you want to try that out, I'd be really happy to see that and I'll of course help if you have any questions. If you think it's too much effort or you don't have time, let me know and we'll merge this with the usize usage. (Though the Option<usize> do need to be fixed, that's a bit too much memory usage on a single bit for me to handle.)

But really good code, really cleanly done, and great job!

Read the original on github.com ↗