Skip to content
Prev 22839 / 63424 Next

allocVector bug ?

On Thursday 09 November 2006 12:21 pm, Luke Tierney wrote:
Well, I was seeing it call gc for every large vector. This probably happens be 
only for those larger  than R_VGrowIncrFrac * R_NSize. On my system R_NSize 
is never more than 1e6 so this would explain the problems when using 1e6 (and 
larger) vectors.
The Chars are defined to create lots of ncells and make gc() run time more 
realistic. It also mimics having a data.frame with a few factor columns.

As for system.time - thank you, I missed that ! 
Setting gcFirst=FALSE changes behavior in the first example to be 2 times 
faster and makes all the allocations in the second example faster.

I guess that extra call to gc() caused R_VSize to shrink too fast.
Would there be something I can help you with ? Is there a script to run 
through common usage patterns ?

                          thank you !

                                  Vladimir Dergachev