[R-SIG-Finance] serialize()
mat
matthieu.stigler at gmail.com
Sat Aug 21 12:04:23 CEST 2010
Fernando
Is this not rather a "high power computing" specific question? You might
get better advices on the list r-sig-hpc!
Mat
Le 21. 08. 10 09:51, Fernando Saldanha a écrit :
> In this post:
>
> http://www.mail-archive.com/r-devel@r-project.org/msg13248.html
>
> Henrik Bengtsson observes that the R function serialize() can run very
> slowly when the argument connection is null and provides a function
>
> serialize2() that runs much faster. The post is dated 7/24/2008.
>
> Some code I wrote using package Rmpi was running slowly and I found
> out the bottleneck was exactly the function serialize(), which is
> called by some functions in Rmpi.
>
> So I inserted the command
>
> serialize<- serialize2
>
> in my code and there was a dramatic acceleration of the relevant
> portions of the program.
>
> I have run the same code on two other computers and it did not run
> slowly. To be more specific:
>
> In all three computers I am running R 2.11.1.
>
> All three computers are made by HP.
>
> One dual core desktop PC (with no hyperthreading) running Windows XP
> 32-bit and one Intel i5 notebook (dual core with hyperthreading)
> running Windows 7 64-bit are not slowed down by serialize().
>
> One dual core notebook (no hyperthreading) running Windows 7 64-bit
> executes serialize() very slowly.
>
> I used the function memory.limit() to increase memory allocation but
> that did not make any difference.
>
> Of course substituting serialize2 for serialize() is not an ideal
> situation, among other reasons because serialize2() needlessly writes
> to and reads from a connection (a temporary file).
>
> Does anyone have insights on what is going on and maybe better ways to
> deal with the issue?
>
> Thanks.
>
> Fernando Saldanha
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>
More information about the R-SIG-Finance
mailing list