hardware - Why is R slower on my (stronger) Desktop than on my (weaker) laptop? -
i'm using dell latitude e7440 laptop windows 7 enterprise os, 8gb ram, 64-bit os, intel(r) core(tm) i7-4600u cpu @ 2.10ghz processor, 2701 mhz, 2 cores, 4 logical processors (that's 4 cores).
i'm using dell precision tower 7810 desktop windows 7 enterprise os, 32gb ram, 64-bit os, intel(r) xeon(r) cpu e5-2620 v3 @ 2.40ghz 2 processors, 2401 mhz, 6 cores, 12 logical processors (that's 24 cores).
a demonstration of use of r running binary classification using gbm
in rstudio on 100k-sized data ~300 features. whatever on laptop r version (all other software closed, no use of parallelization), considerably faster on desktop r version. how can be? need find out?
laptop:
> sum <- 0; system.time(for (i in 1:1000000) sum <- sum + i) user system elapsed 0.36 0.00 0.36 > memory.limit() [1] 8097 > sessioninfo() r version 3.3.1 (2016-06-21) platform: x86_64-w64-mingw32/x64 (64-bit) running under: windows 7 x64 (build 7601) service pack 1 locale: [1] lc_collate=english_united states.1252 lc_ctype=english_united states.1252 lc_monetary=english_united states.1252 [4] lc_numeric=c lc_time=english_united states.1252 attached base packages: [1] stats graphics grdevices utils datasets methods base loaded via namespace (and not attached): [1] tools_3.3.1
desktop:
> sum <- 0; system.time(for (i in 1:1000000) sum <- sum + i) user system elapsed 0.52 0.00 0.52 > memory.limit() [1] 32684 > sessioninfo() r version 3.3.1 (2016-06-21) platform: x86_64-w64-mingw32/x64 (64-bit) running under: windows 7 x64 (build 7601) service pack 1 locale: [1] lc_collate=english_united states.1252 lc_ctype=english_united states.1252 lc_monetary=english_united states.1252 [4] lc_numeric=c lc_time=english_united states.1252 attached base packages: [1] stats graphics grdevices utils datasets methods base loaded via namespace (and not attached): [1] tools_3.3.1
dell latitude e7440 laptop ... i7-4600u cpu @ 2.10ghz processor, 2701 mhz
dell precision tower 7810 desktop ... e5-2620 v3 @ 2.40ghz 2 processors, 2401 mhz
that why. laptop's cpu running @ faster physical clock speed desktop, hence r runs faster.
in absence of multithreaded blas or other parallel-processing tricks, having multiple cores won't affect matters. similarly, long have enough memory hold data, more gigabytes won't speed things (excepting caching issues 100k should fit cache on both machines).
Comments
Post a Comment