On Wed, 4 May 2005, Jeff Enos wrote:
> R-devel,
>
> The performance of as.Date differs by a large degree between one of my
> machines with glibc 2.3.2:
>
>> system.time(x <- as.Date(rep("01-01-2005", 100000), format = "%m-%d-%Y"))
> [1] 1.17 0.00 1.18 0.00 0.00
>
> and a comparable machine with glibc 2.3.3:
>
>> system.time(x <- as.Date(rep("01-01-2005", 100000), format = "%m-%d-%Y"))
> [1] 31.20 46.89 81.01 0.00 0.00
>
> both with the same R version:
>
>> R.version
> _
> platform i686-pc-linux-gnu
> arch i686
> os linux-gnu
> system i686, linux-gnu
> status
> major 2
> minor 1.0
> year 2005
> month 04
> day 18
> language R
>
> I'm focusing on differences in glibc versions because of as.Date's use
> of strptime.
>
> Does it seem likely that the cause of this discrepancy is in fact
> glibc? If so, can anyone tell me how to make the performance of the
> second machine more like the first?
>
> I have verified that using the chron package, which I don't believe
> uses strptime, for the above character conversion performs equally
> well on both machines.
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________
R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu May 05 16:36:42 2005
This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:05 GMT