Hacker News new | past | comments | ask | show | jobs | submit login

Weird, it was fine for me with and without -O. Nothing about that code should be doing bounds checks, as it's just allocating an array.



Version: rustc 1.13.0 (2c6933acc 2016-11-07)

I remember installing it by cut and pasting one of the "curl ... | sh" commands there.

> Nothing about that code should be doing bounds checks, as it's just allocating an array.

I didn't dive into the macro definition for vec!, but I assume there is a loop in there to Copy the initialization element 10 billion times. I think you guys do bounds checking on the lower level reference to a slice that Vec uses. But I really don't know. If it's not that, then it was hanging or spinning doing something else. (Debug version of your memory allocator?)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: