Memory that a process gets from an OS is almost always zeroed (and sometimes is 
actually a copy-on-write all zero virtual memory page replicated however many 
times is needed, depending upon the OS).

However, what `newSeqUninitialized` in Nim gives you will depend upon the 
history of the memory in your process. Using uninitialized memory that happens 
to be 0 _while you are testing but winds up being otherwise later_ is often 
considered one of the (many) "gotchas" of C/C++ programming.

You should probably not use `newSeqUninitialized` in Nim unless you _really_ 
know what you are doing and it is an important optimization as revealed by 
profiling your code in the context of your problem.

Reply via email to