Dear R developers,

  The slow performance of serializing to a raw vector on Windows is an
issue that has appeared in this list before. It appears to be due to
the frequent use of realloc from the resize_buffer method in
serialize.c.

I suggest a more granular, but still incremental, re-allocation of
memory. For example change near the top of resize_buffer to:

R_size_t newsize = needed + 65536 - (needed % 65536);

or some other similar small multiple of a typical system page size.

I have found this to dramatically improve performance of serialization
to raw vectors on Windows.

Best,

Bryan

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to