News for hackers. Stuff that matters.
Re:Comparing k-NN in Rust by pbsd on Tuesday June 10, 2014 @01:00PM (#7873761)
Well Rust is checking for null pointers at the assembly level: http://goo.gl/eh2aqc (lines 22--27).
Re:Comparing k-NN in Rust by pcwalton on Tuesday June 10, 2014 @01:03PM (#7873797)
Blech. I'm pretty sure LLVM, not the frontend, is inserting those null checks for some reason.
Re:Comparing k-NN in Rust by kzrdude on Tuesday June 10, 2014 @04:02PM (#7874960)
The slice iterator yields `Option<&T>`, the None variant is represented by a null pointer. That's probably the null check.
Re:Comparing k-NN in Rust by dbaupp on Tuesday June 10, 2014 @04:52PM (#7875251)
This is https://github.com/mozilla/rust/issues/11751: LLVM doesn't understand (non)null pointers enough.