On Monday, November 24, 2014 3:05:59 PM UTC-5, Stefan Karpinski wrote:
>
> Using calloc could reduce this significantly since the kernel can lazily 
> fill zero pages only when you access them.
>

Even better, on some systems (e.g. Linux) calloc is implemented via 
copy-on-write of a single zero page, so it only needs to fill new zero 
pages when you write.

Unfortunately, Julia allocates 16-byte aligned data by default (to help 
SIMD code), and there is no calloc version of posix_memalign as far as I 
know.

Reply via email to