[Rd] serialize() takes too long when serializing to a raw vector

Hin-Tak Leung hin-tak.leung at cimr.cam.ac.uk
Thu Jan 25 16:25:43 CET 2007


Ashish Kulkarni wrote:
> Hin-Tak Leung wrote:
>> It might be interesting to know get some details on your hardware.
>>
> 
> It's a P4 2.66GHz with a standard Intel motherboard having 1GB RAM.
> 
<snipped>

That figures - I am on an opteron 2.2GHz on x86_64 linux with the
same amount memory, and running R in 32-bit mode; so my numbers
are a bit lower than yours.

> Well, the timings certainly differ quite a bit. What kind of
> hardware do you have? I suspect that most of the delay may be
> caused by memory reallocation since the size of the output 
> raw array is not known up front. I would imagine that WINE 
> would use the system memory allocator, not the one used by 
> the windows kernel.
<snipped>

Yes, as others has replied about realloc(). Wine's msvcrt is
probaby some sort of wrapper around glibc's, and differs from how
genuine windows works in that regard.

HTL



More information about the R-devel mailing list