[Rd] Suggestion for serialization performance improvement on Windows

From: Bryan W. Lewis <bwaynelewis_at_gmail.com>
Date: Fri, 09 Jul 2010 00:49:29 -0400

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.



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 09 Jul 2010 - 08:00:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 20 Jul 2010 - 12:20:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive