From hin-tak.leung at cimr.cam.ac.uk  Thu Jan 25 16:25:43 2007
From: hin-tak.leung at cimr.cam.ac.uk (Hin-Tak Leung)
Date: Thu, 25 Jan 2007 15:25:43 +0000
Subject: [Rd] serialize() takes too long when serializing to a raw vector
In-Reply-To: <2AB7346A3227A74BB97F9A0D79E3E65A090DC9@kalyptomail.dnsalias.com>
References: <2AB7346A3227A74BB97F9A0D79E3E65A090DC9@kalyptomail.dnsalias.com>
Message-ID: <45B8CBF7.3010408@cimr.cam.ac.uk>

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



[Rd] serialize() takes too long when serializing to a raw vector
Hin-Tak Leung