the fastest processor to compile scala?

3,317 views
Skip to first unread message

Kostas kougios

unread,
Mar 12, 2013, 6:19:01 PM3/12/13
to scala...@googlegroups.com
Anyone knows which is the optimal CPU & number of cores to compile scala code (big projects)?

There is a small "benchmark" that we all can run:

git clone https://code.google.com/p/scalascriptengine/
cd scalascriptengine/scalascriptengine/
git checkout c2551de1fb3e2c61410817e2d590227b8d910fc1

run twice:
mvn -P scala2.10 clean package -DskipTests

(note down the number of seconds the 2nd time took to run)

On my machine (4 cores, AMD Phenom(tm) II X4 910e Processor):

Total time: 42.168s

lscpu output:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             AuthenticAMD
CPU family:            16
Model:                 4
Stepping:              3
CPU MHz:               2600.000
BogoMIPS:              5200.20
Virtualization:        AMD-V
L1d cache:             64K
L1i cache:             64K
L2 cache:              512K
L3 cache:              6144K
NUMA node0 CPU(s):     0-3




Andrzej Giniewicz

unread,
Mar 12, 2013, 6:59:28 PM3/12/13
to Kostas kougios, scala-user
Fastest machine I have access to is single CPU sever with Xeon E3-1235
@ 3.2GHz (SandyBridge) - it completed this benchmark in 20.679s. It
isn't fastest one can get for sure, I believe raw power is most
important. I don't think compiling is too different from any other
task, I don't think it uses fancy instructions like those specialized
extensions for video encoding or something - all 3 results I got
(Phenom 955 approx 32s and i7 870 approx 24s), and yours, seems to
preserve ordering present in benchmarks like
http://www.cpubenchmark.net/high_end_cpus.html - I might be mistaken
though.

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 42
Stepping: 7
CPU MHz: 1600.000
BogoMIPS: 6403.15
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 8192K
NUMA node0 CPU(s): 0-7
> --
> You received this message because you are subscribed to the Google Groups
> "scala-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to scala-user+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Dave

unread,
Mar 12, 2013, 7:02:23 PM3/12/13
to scala...@googlegroups.com
Maybe harddisk and (caching) SSD specs influence the compile time too since compiling is a writing too disk operation..

Op dinsdag 12 maart 2013 23:19:01 UTC+1 schreef Kostas kougios het volgende:

Clint Gilbert

unread,
Mar 12, 2013, 7:16:39 PM3/12/13
to scala...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When compiling a ~12kloc project I work on (25kloc with tests),
switching to an SSD made a very big difference, say a factor of 2-3.

The CPU is certainly important - my newish i7 at work beats my old
Phenom II 965 at home by about 30% - but disk IO is a big factor when
compiling Scala.

On 03/12/2013 07:02 PM, Dave wrote:
> Maybe harddisk and (caching) SSD specs influence the compile time
> too since compiling is a writing too disk operation..
>
> Op dinsdag 12 maart 2013 23:19:01 UTC+1 schreef Kostas kougios het
> volgende:
>
> Anyone knows which is the optimal CPU & number of cores to compile
> scala code (big projects)?
>
> There is a small "benchmark" that we all can run:
>
> git clone https://code.google.com/p/scalascriptengine/
> <https://code.google.com/p/scalascriptengine/> cd
> scalascriptengine/scalascriptengine/ git checkout
> c2551de1fb3e2c61410817e2d590227b8d910fc1
>
> run twice: mvn -P scala2.10 clean package -DskipTests
>
> (note down the number of seconds the 2nd time took to run)
>
> On my machine (4 cores, AMD Phenom(tm) II X4 910e Processor):
>
> *Total time: 42.168s*
>
> lscpu output:
>
> Architecture: x86_64 CPU op-mode(s): 32-bit,
> 64-bit Byte Order: Little Endian CPU(s):
> 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per
> socket: 4 Socket(s): 1 NUMA node(s): 1
> Vendor ID: AuthenticAMD CPU family: 16
> Model: 4 Stepping: 3 CPU MHz:
> 2600.000 BogoMIPS: 5200.20 Virtualization:
> AMD-V L1d cache: 64K L1i cache: 64K L2
> cache: 512K L3 cache: 6144K NUMA node0
> CPU(s): 0-3
>
>
>
> -- You received this message because you are subscribed to the
> Google Groups "scala-user" group. To unsubscribe from this group
> and stop receiving emails from it, send an email to
> scala-user+...@googlegroups.com. For more options, visit
> https://groups.google.com/groups/opt_out.
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlE/t1cACgkQ5IyIbnMUeTtvwQCfTslQJJcMC+zOkd14MLHxpBaW
+PoAni1Ht04vVJdhUYyCc8xnoLDr9dhD
=815M
-----END PGP SIGNATURE-----

Johannes Rudolph

unread,
Mar 13, 2013, 3:40:08 AM3/13/13
to Clint Gilbert, scala-user
Laptop with Intel(R) Core(TM) i7-3840QM CPU @ 2.80GHz

mvn -P scala2.10 clean package -DskipTests 50.88s user 0.62s system
229% cpu 22.469 total

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Stepping: 9
CPU MHz: 1200.000
BogoMIPS: 5587.68
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 8192K
NUMA node0 CPU(s): 0-7


Johannes

-----------------------------------------------
Johannes Rudolph
http://virtual-void.net

Tim Pigden

unread,
Mar 13, 2013, 4:38:23 AM3/13/13
to Kostas kougios, scala-user
On my shiny new desktop - with 3770K cpu, 16gb ram and neutron-gtx 240gb ssd

Assuming I don't have to worry about the warning below, and it did complete: 17s

[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.071s
[INFO] Finished at: Wed Mar 13 08:33:31 GMT 2013
[INFO] Final Memory: 11M/239M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "scal2.10" could not be activated because it does not exist.






--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Tim Pigden
Optrak Distribution Software Limited
+44 (0)1992 517100
http://www.linkedin.com/in/timpigden
http://optrak.com
Optrak Distribution Software Ltd is a limited company registered in England and Wales.
Company Registration No. 2327613 Registered Offices: Orland House, Mead Lane, Hertford, SG13 7AT England 
This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Optrak Distribution Software Ltd. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error.

Rafał Krzewski

unread,
Mar 13, 2013, 6:35:14 AM3/13/13
to scala...@googlegroups.com
If I were to build a workstation for full time Scala development I'll stick to the following:
- GHz matter more than number of CPU cores, because scalac is (mostly?) single threaded
- memory bandwidth is important, but memory latency even more so
- storage bandwidth is important very important

Example configuration:
CPU: i7-3930K, can be relatively overclocked to about 4.5GHz with a decent cooling
MB: ASUS ROG Rampage IV Extreme, a gamer/enthusiast type board renown for overclocking/tuning capabilities
RAM: 2 or 4 x RAMCORD38GB2133CL9A - fill eiter 4 or 8 slots to use quad channel memory access. If you can get the memory to run stable at 2000MHz/CL8 it'll be even better.
Storage: 2 x OCZ VTX3-25SAT3-240 or equivalent SATA3 SSD, running in RAID 0

Ah, I'd love to build a rig like that :]

Cheers,
Rafał

Paul Keeble

unread,
Mar 13, 2013, 6:59:23 AM3/13/13
to scala-user
On a Sandy Bridge Enterprise 3930k running at 4.4Ghz with 16GB of 2333 Mhz RAM and an M4 SSD I get
real    0m17.526s
user    0m0.000s
sys     0m0.091s

According to task Manager there are peaks of 35% usage, and other peaks around 22% usage which corresponds roughly to 4 and 3 cores worth of processing being used.

On the same machine but utilising a NAS with 4 disks in Raid 5 I see
real    0m38.093s
user    0m0.000s
sys     0m0.090s

So disk IO performance matters a lot here, not surprisingly. In the past however I have found that for Scala once you have enough IO (and SSD basically) the CPU is what matters. Once you can load and write all those small files quickly the CPU processing becomes the dominate factor. I didn't see any performance difference going from an Intel X25-M 80GB SSD to the Crucial M4 512GB SSD at all in Scala compilation. Despite the age and relatively low performance of the Intel disk.

PK

Paul Keeble
Director
P Keeble Consulting ltd
Mobile: 07931488924


James Moore

unread,
Mar 13, 2013, 2:24:54 PM3/13/13
to Paul Keeble, scala-user
You might experiment with running on a ramdisk - that should remove any IO issues.

HamsterofDeath

unread,
Mar 13, 2013, 2:40:14 PM3/13/13
to scala...@googlegroups.com
Am 13.03.2013 19:24, schrieb James Moore:
> You might experiment with running on a ramdisk - that should remove
> any IO issues.
> --
> You received this message because you are subscribed to the Google
> Groups "scala-user" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to scala-user+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
i tried compiling from/to ramdrives and from/to ssds. didn't measure it,
but there was no noticeable difference, probably because everything is
cached/buffered anyway.
should i try to benchmark? i got a core i7 @ 4.5ghz, 4 cores + HT :)

Kostas kougios

unread,
Mar 13, 2013, 4:43:49 PM3/13/13
to scala...@googlegroups.com
Lots of useful answers. It seems the high end i7 is the way to go. Anyone with a high end AMD?

I tried it on my laptop (with the typical 5400rpm disk. My desktop has an SSD). My i5 laptop is faster than my desktop compiling this one:

Total time: 31.358s

Most of the time, up to 3 processors are used. But I know for sure that for multi-module projects you can use as many as you got i.e. with the -T 2C mvn parameter. Also intellij allows multi-threaded compilation of independent projects so I am thinking of going for a 6 core i7.

My laptop's cpu:


Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2

Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 42
Stepping:              7
CPU MHz:               800.000
BogoMIPS:              4988.85

Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K
NUMA node0 CPU(s):     0-3

Florian Hars

unread,
Mar 14, 2013, 7:58:15 AM3/14/13
to scala...@googlegroups.com
Am 12.03.2013 23:19, schrieb Kostas kougios:
> *Total time: 42.168s*

Ooohhh, I can easily beat that number:

[INFO] Total time: 16 minutes 51 seconds

> lscpu output:

Architecture: armv5tel
CPU(s): 1

Do I win a price?

- Florian.dd

kostas....@googlemail.com

unread,
Mar 14, 2013, 10:49:31 AM3/14/13
to Florian Hars, scala...@googlegroups.com
Whats that? Did you compile it on a phone???

Sent from my self
> --
> You received this message because you are subscribed to a topic in the Google Groups "scala-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-user/PJbQefbsn0M/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to scala-user+...@googlegroups.com.

Florian Hars

unread,
Mar 14, 2013, 12:14:34 PM3/14/13
to kostas....@googlemail.com, scala...@googlegroups.com
Am 14.03.2013 15:49, schrieb kostas....@googlemail.com:
> Whats that? Did you compile it on a phone???

No, a cheap NAS box (QNAP TS119P), current gen phones are
faster (but usually have no space for SATA drives).

- Florian.

Dave

unread,
Mar 14, 2013, 12:23:21 PM3/14/13
to scala...@googlegroups.com
I had 
Total time: 34.585s

Windows 7 Home Premium +SP1 (32 bit)
P7350 2GHz, L2 cache = 3MB (2 cores, no hyper threading = 2 logical processors)
3GB RAM
harddisk 115GB

Windows performance index total 3.9 (determined by lowest score)
processor 5.5
memory 5.7
graphics desktop windows aero 3.9
graphics in applications and games in 3D  5.3
primary harddisk 5.3

but probably for scala compiling wpi would be 5.3 since graphics are irrelevant









Op woensdag 13 maart 2013 21:43:49 UTC+1 schreef Kostas kougios het volgende:

Dave

unread,
Mar 14, 2013, 12:54:09 PM3/14/13
to scala...@googlegroups.com
Maybe you need to tune your system, because how can my 5 year old laptop with far less memory and speed be faster than your desktop computer?

Op dinsdag 12 maart 2013 23:19:01 UTC+1 schreef Kostas kougios het volgende:

kostas....@googlemail.com

unread,
Mar 14, 2013, 1:51:45 PM3/14/13
to Dave, scala...@googlegroups.com
Weird, maybe 32 bit java is much faster. Anyone else on 32 bits?

Sent from my self

Kostas kougios

unread,
Mar 16, 2013, 12:05:50 PM3/16/13
to scala...@googlegroups.com
secs on AMD FX(tm)-8120 Eight-Core Processor , 1333Mhz Memory

vendor_id    : AuthenticAMD
cpu family    : 21
model        : 1
model name    : AMD FX(tm)-8120 Eight-Core Processor          
stepping    : 2
cpu MHz        : 3110.333
cache size    : 2048 KB
physical id    : 0
siblings    : 8
core id        : 7
cpu cores    : 4
apicid        : 23
initial apicid    : 7
fpu        : yes
fpu_exception    : yes
cpuid level    : 13
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nonstop_tsc extd_apicid aperfmperf pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 nodeid_msr topoext perfctr_core cpb npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold
bogomips    : 6220.66
TLB size    : 1536 4K pages



Kostas kougios

unread,
Mar 16, 2013, 12:06:19 PM3/16/13
to scala...@googlegroups.com
I meant 39 secs

Kostas kougios

unread,
Mar 16, 2013, 12:11:01 PM3/16/13
to scala...@googlegroups.com
and 31 secs on a AMD Phenom(tm) II X6 1075T Processor. Weird that Phenom is faster than the FX!

Rich Oliver

unread,
Mar 16, 2013, 2:04:00 PM3/16/13
to scala...@googlegroups.com
On Saturday, March 16, 2013 4:11:01 PM UTC, Kostas kougios wrote:
and 31 secs on a AMD Phenom(tm) II X6 1075T Processor. Weird that Phenom is faster than the FX!

Bulldozer architecture was an absolute catastrophe on the desktop. A huge number of transistors (1.2 billion rather than the original 2 billion we were told), drains power like its going out of fashion and core for core(module) fails to compete with AMD's previous generation. I speak as someone who has supported AMD against big brother Intel. Although I guess now Intel is using Scala I'll view Intel in a more favourable light.

My guess is that for anyone on a modest budget an Ivy Bridge I5 will be quite sufficient and beat anything AMD has to offer, and that resources should be focused on lots of memory and a fast Static Drive.

Dave

unread,
Mar 16, 2013, 2:22:43 PM3/16/13
to scala...@googlegroups.com
Survey best CPUs for compiling scala

64 bit
======
Name                            PMCPUMark Rank    CPUValue Price
Intel Core i7-3770K @ 3.50GHz   9632      30      30.87    $311.99  17 s
Intel Core i7-3930K @ 3.20GHz   12112     13      22.43    $539.99 4.4Ghz: 17 s
Intel Xeon E3-1235 @ 3.20GHz    8023      72      29.83    $268.99  20.679s
Intel Core i7-3840QM @ 2.80GHz  9070      42      14.63    $619.99  22.469
Intel Core i7 870 @ 2.93GHz     5455      171     14.06    $387.99  24s
AMD Phenom II X6 1075T          5407      174     41.60    $129.99  31 s
AMD Phenom 9550 Quad-Core       2480      519     24.81    $99.97*  32s
AMD FX-8120 Eight-Core          6654      110     45.89    $144.99  39 s
AMD Phenom II X4 910e           3288      377     20.94    $156.99* 42.168s

Intel Xeon E5-1650 @ 3.20GHz    11453     15      19.64    $583.00* ???????????????

32 bit
======
Name                            PMCPUMark Rank    CPUValue Price
Intel Core2 Duo P7350 @ 2.00GHz 1274/1326 882     NA       NA       34.585s
http://www.passmark.com/baselines/V8/display.php?id=6288045519 (own measurement)

arm
===
armv5tel                                                            16 minutes 51 seconds

Kostas kougios

unread,
Mar 16, 2013, 6:31:23 PM3/16/13
to scala...@googlegroups.com

Dave

unread,
Mar 16, 2013, 7:49:49 PM3/16/13
to scala...@googlegroups.com
Based on the Passmark ranking AMD FX-8120 should be 23 s and AMD Phenom II X4 910e should be 31-32 s.
Maybe an update of the BIOS will help?

Op zaterdag 16 maart 2013 23:31:23 UTC+1 schreef Kostas kougios het volgende:

virtualeyes

unread,
Mar 16, 2013, 11:38:03 PM3/16/13
to scala...@googlegroups.com
Well, not all of us, don't feel like pulling down 200MB of dependencies to install maven...

FWIW, just upgraded from/to:
i7 840QM                 > 3840QM
SSD 200MB r/w       > 500MB r/w
RAM 8GB 1333Mhz > 16GB 1666Mhz

and build times have been reduced 30-50%

Suspect most of build time reduction is due to the 3840QM's higher base clock speed compared to the 1st generation 840QM (2.8Ghz vs. 1.8Ghz).

I have read that mobile quad core CPUs are not capable of reaching advertised max turbo speeds under load due to thermal issues (i.e. CPU throttles down to base clock speed across all cores). SBT Parallel compilation is then the hoped for savior as clock speeds are going nowhere fast based on current/recent technology.

RAM disk solutions I have come across suggest a possible 10% performance increase, along with increased maintenance headaches.

It would be nice to know how much I/O throughput one actually requires to keep pace with scalac. It may be that any SSD released in the past couple of years will more than suffice.

Not that I'm an expert on the subject, but I'd say the key ingredients are CPU base clock speed + CPU cache size, followed by SSD and sufficient available RAM of any clock speed at/over 1066Mhz.

Nobody has mentioned JVM args; there must be some magic foo around code cache size and friends that allow one to maximize hardware resources to achieve Java build times (if only!)

Have your cake and not eat it too

Konstantinos Kougios

unread,
Mar 17, 2013, 8:01:00 AM3/17/13
to scala...@googlegroups.com
8350 is said to be much faster on linux : http://en.wikipedia.org/wiki/Bulldozer_%28microarchitecture%29#Performance_on_Linux

anyone with FX-8350?
--

Dave

unread,
Mar 17, 2013, 11:55:54 AM3/17/13
to scala...@googlegroups.com
3840QM is already in the list.

Op zondag 17 maart 2013 04:38:03 UTC+1 schreef virtualeyes het volgende:

Rohit Rai

unread,
Mar 18, 2013, 3:07:20 AM3/18/13
to scala...@googlegroups.com
Compiling it on my Laptop with i7 2360QM with 16G RAM and SSD disk gives me this -

Total time: 27.458s

RAM is not used much... so I think SSD is the differentiator.

Regards,
Rohit



--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.

Rafał Krzewski

unread,
Mar 18, 2013, 6:31:21 AM3/18/13
to scala...@googlegroups.com
I think it would be useful to prepare a benchmark according to storage type: SATA II vs SATA III attached SSD, RAID-0, single vs dual (RAID-0) etc.
BTW, anyone onboard with an OCZ RevoDrive? ;)

cheers,
Rafał

Will Sargent

unread,
Mar 18, 2013, 2:38:13 PM3/18/13
to Rafał Krzewski, scala...@googlegroups.com
On Mon, Mar 18, 2013 at 3:31 AM, Rafał Krzewski
<rafal.k...@gmail.com> wrote:
> I think it would be useful to prepare a benchmark according to storage type:
> SATA II vs SATA III attached SSD, RAID-0, single vs dual (RAID-0) etc.
> BTW, anyone onboard with an OCZ RevoDrive? ;)

I did this once when I was compiling ATG code: I quickly found that
I/O was a huge bottleneck, but SATA 3 didn't give huge benefits over
SATA 2.

The thread: http://arstechnica.com/civis/viewtopic.php?f=8&t=1120104&start=40

On the WD Caviar SE16 7200 RPM (WD5000AAKS), it takes 2 minutes, 52
seconds from a warm start.
On the Crucial RealSSD, it takes 1 minute, 55 seconds from a cold
start, 1 minute 39 seconds from a warm start.

Source: http://arstechnica.com/civis/viewtopic.php?p=20782052#p20782052

Will.

Dave

unread,
Mar 18, 2013, 4:31:53 PM3/18/13
to scala...@googlegroups.com, kostas....@googlemail.com
Haswell Core i7-4770K @ 3.50GHz, 84W is 7 to 13% faster than Ivy-Bridge i7-3770K @ 3.50GHz, 77W (which compiles Scala in 17 s).
see: http://www.tomshardware.com/reviews/core-i7-4770k-haswell-performance,3461.html

david crosson

unread,
Mar 18, 2013, 5:34:52 PM3/18/13
to scala...@googlegroups.com, kostas....@googlemail.com, david....@orange.com
It is not just a matter of CPU, on my linux system Gentoo, kernel 3.7.10 with AMD Phenom(tm) II X6 1090T Processor :

- JVM hotspot 1.6.0_29 64 bits : 26.189s
- JVM hotspot 1.6.0_29 32 bits : 24.530s

- JVM hotspot 1.7.0_05 64 bits : 32.653s
- JVM hotspot 1.7.0_09 64 bits : 32.871s
- JVM hotspot 1.7.0_11 64 bits : 32.298s
  => So here the new String.substring change starting from 1.7.0_06 is not responsible of 1.7 bad performances


- JVM IBM 1.6SR9 64bits : 23.387s
- JVM IBM 1.6SR9 32bits : 23.941s

- JVM IBM 1.7SR4 64bits : 29.275s
- JVM IBM 1.7SR4 32bits : 27.383s
  => hmmm even with IBM 1.7 we got not very good results... what's going on with java 7...


- JVM JRockit 1.6.0_20 64 bits : 18.280s

- JVM JRockit 1.6.0_37 64 bits : 17.340s
- JVM JRockit 1.6.0_37 32 bits : 17.304s


all those results are with default JVM parameters and I guess that we may enhance performances using some JVM tuning options passed to mvn using MAVEN_OPTS env variable.


regards,
David.

Rex Kerr

unread,
Mar 18, 2013, 5:42:18 PM3/18/13
to david crosson, scala...@googlegroups.com, kostas....@googlemail.com, david....@orange.com
That's really interesting.  I wonder what the compiler is doing that JRockit is so highly optimized for?  In my experience, JRockit is poor at high-performance code (pretty much never approaches C++), but sometimes does quite well at turning low-performance code into medium-performance.

  --Rex

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.

Dave

unread,
Mar 18, 2013, 6:01:38 PM3/18/13
to scala...@googlegroups.com, kostas....@googlemail.com, david....@orange.com
I use JRockit too. Basically because I was sick and tired of Oracle Hotspot's PermGen error. Oracle JRockit has another GC model. Strange that Oracle java 7 is slower because I thought that the Hotspot and JRockit would be merged and JRockit GC model would be used.
C:\Users\Dave>java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Oracle JRockit(R) (build R28.2.5-20-152429-1.6.0_37-20120927-1914-windows-ia32,
compiled mode)


Op maandag 18 maart 2013 22:34:52 UTC+1 schreef david crosson het volgende:

Dave

unread,
Mar 18, 2013, 6:15:51 PM3/18/13
to scala...@googlegroups.com, kostas....@googlemail.com, david....@orange.com
Comparing with the passmark rankings (Passmark CPU Mark 5684  rank 160) it is amazingly fast
Were all timings @ 3.20GHz or is the CPU overclocked?


Op maandag 18 maart 2013 22:34:52 UTC+1 schreef david crosson het volgende:
It is not just a matter of CPU, on my linux system Gentoo, kernel 3.7.10 with AMD Phenom(tm) II X6 1090T Processor :

david crosson

unread,
Mar 19, 2013, 4:21:14 AM3/19/13
to scala...@googlegroups.com, kostas....@googlemail.com, david....@orange.com
No it is not overclocked.

Dennis Haupt

unread,
Mar 19, 2013, 4:53:56 AM3/19/13
to david crosson, scala...@googlegroups.com, kostas....@googlemail.com, david....@orange.com
can you test it with java8?

Gesendet: Dienstag, 19. März 2013 um 09:21 Uhr
Von: "david crosson" <crosso...@gmail.com>
An: scala...@googlegroups.com
Cc: kostas....@googlemail.com, david....@orange.com
Betreff: Re: [scala-user] Re: the fastest processor to compile scala?
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.

Dave

unread,
Mar 19, 2013, 6:40:25 AM3/19/13
to scala...@googlegroups.com, kostas....@googlemail.com, david....@orange.com
Thanks David,
just another check about the 32 bit measurements: was that with a 32 bit jvm on a 32 bit OS or with a 32 bit jvm on a 64 bit OS?



Op dinsdag 19 maart 2013 09:21:14 UTC+1 schreef david crosson het volgende:

张文波

unread,
Mar 19, 2013, 8:03:49 AM3/19/13
to scala...@googlegroups.com
Hi All:
    
     I have some question about Scala boxing with following code:

scala> def box(x:Any){
     |   println(x.getClass)
     | }
box: (x: Any)Unit

scala> def show(){
     |   val a = 2
     |   println(a.getClass)
     |   box(a)
     |   println(a.getClass)
     | }
show: ()Unit

scala> show
int
class java.lang.Integer
int


   why function named "box"  print "java.lang.Integer" ?
   Could anyone explain detail about that?
   Scala Compiler do something about that ?


   Kind regards,
     Ivan

   Ivan Zhang

Dave

unread,
Mar 19, 2013, 9:07:05 AM3/19/13
to scala...@googlegroups.com, kostas....@googlemail.com, david....@orange.com
Funny,
on my laptop the hotspot is faster than jrockit

[INFO] BUILD SUCCESS
[INFO] ---------------------------------------------------------------
[INFO] Total time: 26.426s
[INFO] Finished at: Tue Mar 19 13:57:37 CET 2013
[INFO] Final Memory: 7M/17M
[INFO] ---------------------------------------------------------------
C:\Users\Dave\scalascriptengine\scalascriptengine>java -version
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
Java HotSpot(TM) Client VM (build 20.8-b03, mixed mode, sharing)



Op maandag 18 maart 2013 22:34:52 UTC+1 schreef david crosson het volgende:
It is not just a matter of CPU, on my linux system Gentoo, kernel 3.7.10 with AMD Phenom(tm) II X6 1090T Processor :

Jiayu Liu

unread,
Mar 19, 2013, 11:32:04 AM3/19/13
to 张文波, scala-user
Scala Predef has an method:

implicit def int2Integer(x: Int)Integer = java.lang.Integer.valueOf(x)


Since box takes an Any, the compiler decided to auto-box the value to be an java.lang.Integer.

On scala 2.10.0 I get:

scala> 1.getClass
res19: Class[Int] = int

scala> (1: Any).getClass
res20: Class[_] = class java.lang.Integer

scala> (1: AnyVal).getClass
res21: Class[_] = class java.lang.Integer

scala> (1: AnyRef).getClass
<console>:8: error: type mismatch;
 found   : Int(1)
 required: AnyRef
Note: an implicit exists from scala.Int => java.lang.Integer, but
methods inherited from Object are rendered ambiguous.  This is to avoid
a blanket implicit which would convert any scala.Int to any AnyRef.
You may wish to use a type ascription: `x: java.lang.Integer`.
              (1: AnyRef).getClass
               ^


--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.

Derek Williams

unread,
Mar 19, 2013, 1:41:34 PM3/19/13
to Kostas kougios, scala-user
Gave this a shot. For the second run I got this:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.541s
[INFO] Finished at: Tue Mar 19 11:27:22 MDT 2013
[INFO] Final Memory: 14M/302M
[INFO] ------------------------------------------------------------------------

CPU: i7-2600K (OC'ed to 4.3ghz)
Memory: 16gb
Disk: OCZ Vertex 2 180gb, formatted as btrfs
OS: ArchLinux 64bit, Custom 3.8.2 kernel using zen-kernel patchset (http://zen-kernel.org/)
JVM: Oracle Hotspot 1.7.0_17

lscpu:
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 42
Stepping:              7
CPU MHz:               1600.000
BogoMIPS:              6802.30
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7



--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Derek Williams

kostas....@googlemail.com

unread,
Mar 19, 2013, 2:15:36 PM3/19/13
to Derek Williams, scala-user
That is fast! So is your processor easily overclockable and stable; do you have any special hardware?

I tried compiling with jrockit 1.6 and compilation took 17 secs out of 31 that it used to take with oracle jdk!!! But when i configured intellij to use jrockit for fsc it takes exactly the same time as oracle jdk (i have verified that indeed fsc runs with jrockit) . Such a shame. I dont know why it doesnt work within intellij

Sent from my self

Derek Williams

unread,
Mar 19, 2013, 2:38:09 PM3/19/13
to Kostas kougios, scala-user
Nothing too crazy, but the 'K' processors are meant to be overclocked. I'm using a midrange Asus motherboard and a good heatsink, but 4.3 ghz is still low enough that I barely need to tweak the voltage so not much extra heat.

I forgot that I had _JAVA_OPTIONS set, and when I cleared that I got:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.748s
[INFO] Finished at: Tue Mar 19 12:33:55 MDT 2013
[INFO] Final Memory: 14M/302M
[INFO] ------------------------------------------------------------------------

Going through the options I was setting in _JAVA_OPTIONS, it looks like '-XX:+TieredCompilation' is the one that helps the most, bringing the compile times from ~19s -> ~12s

--
Derek Williams

Naftoli Gugenheim

unread,
Mar 19, 2013, 3:00:24 PM3/19/13
to Jiayu Liu, 张文波, scala-user
The problem is that while in theory Scala introduces a new type called Any that is the supertype of primitive types and reference types, it has to output byte code for the JVM that has no such concept. So in the bytecode `box` is void box(java.lang.Object x). Thus scalac is forces to encode box(a) as box(new java.lang.Integer(a)) or the like.

david crosson

unread,
Mar 19, 2013, 6:11:30 PM3/19/13
to scala...@googlegroups.com, david crosson, kostas....@googlemail.com, david....@orange.com
32 bits tests were done on a Linux 64bits OS, I've added java 8 result. 


- JVM hotspot 1.6.0_29 64 bits : 26.189s
- JVM hotspot 1.6.0_29 32 bits : 24.530s

- JVM hotspot 1.7.0_05 64 bits : 32.653s
- JVM hotspot 1.7.0_09 64 bits : 32.871s
- JVM hotspot 1.7.0_11 64 bits : 32.298s

with some hotspot jvm options :
    -Xverify:none
    -XX:+UseFastAccessorMethods
    -XX:+UseFastEmptyMethods
    -XX:+TieredCompilation
    -XX:+OptimizeStringConcat
    -XX:+UseStringCache
- JVM hotspot 1.7.0_11 64 bits : 29.715s


- JVM hotspot 1.8.0-ea 64bits : 31.080s


- JVM IBM 1.6SR9 64bits : 23.387s
- JVM IBM 1.6SR9 32bits : 23.941s

- JVM IBM 1.7SR4 64bits : 29.275s
- JVM IBM 1.7SR4 32bits : 27.383s

- JVM JRockit 1.6.0_20 64 bits : 18.280s

- JVM JRockit 1.6.0_37 64 bits : 17.340s
- JVM JRockit 1.6.0_37 32 bits : 17.304s


$ lscpu
Architecture :        x86_64
Mode(s) opératoire(s) des processeurs : 32-bit, 64-bit
Boutisme :            Little Endian
Processeur(s) :       6
Liste de processeur(s) en ligne : 0-5
Thread(s) par cœur : 1
Cœur(s) par socket : 6
Socket(s) :           1
Nœud(s) NUMA :       1
Identifiant constructeur : AuthenticAMD
Famille de processeur : 16
Modèle :             10
Révision :           0
Vitesse du processeur en MHz : 3200.000
BogoMIPS :            6400.79
Virtualisation :      AMD-V
Cache L1d :           64K
Cache L1i :           64K
Cache L2 :            512K
Cache L3 :            6144K
Nœud NUMA 0 de processeur(s) : 0-5

$ uname -a
Linux lanfeust 3.7.10-gentoo #1 SMP Sun Mar 17 16:09:46 CET 2013 x86_64 AMD Phenom(tm) II X6 1090T Processor AuthenticAMD GNU/Linux

Dave

unread,
Mar 19, 2013, 6:41:36 PM3/19/13
to scala...@googlegroups.com, david crosson, kostas....@googlemail.com, david....@orange.com
Are the jvm options
    -Xverify:none
    -XX:+UseFastAccessorMethods
    -XX:+UseFastEmptyMethods
    -XX:+TieredCompilation
    -XX:+OptimizeStringConcat
    -XX:+UseStringCache
- only for the test JVM hotspot 1.7.0_11 64 bits : 29.715s

or also for the rest?




Op dinsdag 19 maart 2013 23:11:30 UTC+1 schreef david crosson het volgende:

Konstantinos Kougios

unread,
Mar 19, 2013, 6:51:40 PM3/19/13
to david crosson, scala...@googlegroups.com, david....@orange.com
Intellij fsc scala compiler seems to be immune to any JVM version or parameters. I've tried on a bigger project of mine via intellij, jrockit is slower than jdk7, jdk6 performs the same as jdk7 and the params don't make any difference. Some of the params are to reduce startup times anyway and won't have any effect on bigger projects.

I always verified that jetbrains NailgunRunner runs with the correct jvm & params via jconsole. Weird.

On the other hand if I use jrockit from the console & maven, it is twice as fast compiling the sample project. On a bigger project it is faster but not that fast. So jrockit must have optimized startup, nothing more.

Dave

unread,
Mar 19, 2013, 7:00:07 PM3/19/13
to scala...@googlegroups.com, david crosson, david....@orange.com, kostas....@googlemail.com
Are the warnings normal?

C:\Users\Dave\scalascriptengine\scalascriptengine>mvn -P scala2.10 clean package
 -DskipTests
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
com.googlecode.scalascriptengine:scalascriptengine:jar:1.3.1-2.10.0
[WARNING] 'version' contains an expression but should be a constant. @ com.googl
ecode.scalascriptengine:scalascriptengine:1.3.1-${scala.version}, C:\Users\Dave\
scalascriptengine\scalascriptengine\pom.xml, line 11, column 14
[WARNING] 'build.plugins.plugin.version' for net.alchim31.maven:scala-maven-plug
in is missing. @ com.googlecode.scalascriptengine:scalascriptengine:1.3.1-${scal
a.version}, C:\Users\Dave\scalascriptengine\scalascriptengine\pom.xml, line 104,
 column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten t
he stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support buildin
g such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building scalascriptengine 1.3.1-2.10.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ scalascriptengine --
-
[INFO] Deleting C:\Users\Dave\scalascriptengine\scalascriptengine\target
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ scalascriptengine
 ---
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ scalascrip
tengine ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Dave\scalascriptengine\scala
scriptengine\src\main\resources
[INFO]
[INFO] --- scala-maven-plugin:3.1.3:add-source (scala-compile-first) @ scalascri
ptengine ---
[INFO] Add Source directory: C:\Users\Dave\scalascriptengine\scalascriptengine\s
rc\main\scala
[INFO] Add Test Source directory: C:\Users\Dave\scalascriptengine\scalascripteng
ine\src\test\scala
[INFO]
[INFO] --- scala-maven-plugin:3.1.3:compile (scala-compile-first) @ scalascripte
ngine ---
[WARNING]  Expected all dependencies to require Scala version: 2.10.0
[WARNING]  com.googlecode.scalascriptengine:scalascriptengine:1.3.1-2.10.0 requi
res scala version: 2.10.0
[WARNING]  com.googlecode.scalascriptengine:scalascriptengine:1.3.1-2.10.0 requi
res scala version: 2.10.0
[WARNING]  org.scala-lang:scala-compiler:2.10.0 requires scala version: 2.10.0
[WARNING]  org.scala-lang:scala-reflect:2.10.0 requires scala version: 2.10.0
[WARNING]  org.scala-tools.time:time_2.9.1:0.5 requires scala version: 2.9.1
[WARNING] Multiple versions of scala libraries detected!
[INFO] C:\Users\Dave\scalascriptengine\scalascriptengine\src\main\java:-1: info:
 compiling
[INFO] C:\Users\Dave\scalascriptengine\scalascriptengine\src\main\scala:-1: info
: compiling
[INFO] Compiling 17 source files to C:\Users\Dave\scalascriptengine\scalascripte
ngine\target\classes at 1363733581625
[WARNING] warning: there were 60 deprecation warnings; re-run with -deprecation
for details
[WARNING] warning: there were 1 inliner warnings; re-run with -Yinline-warnings
for details
[WARNING] two warnings found
[INFO] prepare-compile in 0 s
[INFO] compile in 10 s
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ scalascriptengi
ne ---
[INFO] Changes detected - recompiling the module!
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ sc
alascriptengine ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Dave\scalascriptengine\scala
scriptengine\src\test\resources
[INFO]
[INFO] --- scala-maven-plugin:3.1.3:testCompile (scala-test-compile) @ scalascri
ptengine ---
[WARNING]  Expected all dependencies to require Scala version: 2.10.0
[WARNING]  com.googlecode.scalascriptengine:scalascriptengine:1.3.1-2.10.0 requi
res scala version: 2.10.0
[WARNING]  com.googlecode.scalascriptengine:scalascriptengine:1.3.1-2.10.0 requi
res scala version: 2.10.0
[WARNING]  org.scala-lang:scala-compiler:2.10.0 requires scala version: 2.10.0
[WARNING]  org.scala-lang:scala-reflect:2.10.0 requires scala version: 2.10.0
[WARNING]  org.scala-tools.time:time_2.9.1:0.5 requires scala version: 2.9.1
[WARNING] Multiple versions of scala libraries detected!
[INFO] C:\Users\Dave\scalascriptengine\scalascriptengine\src\test\java:-1: info:
 compiling
[INFO] C:\Users\Dave\scalascriptengine\scalascriptengine\src\test\scala:-1: info
: compiling
[INFO] Compiling 22 source files to C:\Users\Dave\scalascriptengine\scalascripte
ngine\target\test-classes at 1363733592748
[WARNING] warning: there were 1 deprecation warnings; re-run with -deprecation f
or details
[WARNING] one warning found
[INFO] prepare-compile in 0 s
[INFO] compile in 12 s
[INFO]
[INFO] --- maven-compiler-plugin:3.0:testCompile (default-testCompile) @ scalasc
riptengine ---
[INFO] Changes detected - recompiling the module!
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ scalascriptengine
---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ scalascriptengine ---
[INFO] Building jar: C:\Users\Dave\scalascriptengine\scalascriptengine\target\sc
alascriptengine-1.3.1-2.10.0.jar

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.520s
[INFO] Finished at: Tue Mar 19 23:53:25 CET 2013
[INFO] Final Memory: 7M/17M
[INFO] ------------------------------------------------------------------------






Op dinsdag 19 maart 2013 23:51:40 UTC+1 schreef Konstantinos Kougios het volgende:

Konstantinos Kougios

unread,
Mar 19, 2013, 7:01:08 PM3/19/13
to Dave, scala...@googlegroups.com, david crosson, david....@orange.com
yes,those are normal

张文波

unread,
Mar 19, 2013, 10:05:51 PM3/19/13
to Naftoli Gugenheim, Jiayu Liu, scala-user

thanks.
this really helpful.

david crosson

unread,
Mar 20, 2013, 4:23:24 AM3/20/13
to scala...@googlegroups.com, david crosson, kostas....@googlemail.com, david....@orange.com
Yes only for this test.

Dave

unread,
Mar 20, 2013, 8:11:52 AM3/20/13
to scala...@googlegroups.com, Dave, david crosson, david....@orange.com, kostas....@googlemail.com
I made a new survey as a gist to get the formatting right

https://gist.github.com/DaveGit/5204178







Op woensdag 20 maart 2013 00:01:08 UTC+1 schreef Konstantinos Kougios het volgende:

Dave

unread,
Mar 21, 2013, 9:17:55 AM3/21/13
to scala...@googlegroups.com, Dave, david crosson, david....@orange.com, kostas....@googlemail.com
Message has been deleted

James Birchfield

unread,
Mar 21, 2013, 7:14:05 PM3/21/13
to scala...@googlegroups.com
On my MacBook Pro with a  2.4GHz Intel Core i7, 8GB RAM, no SSD, it took 26.1 seconds.

I really need to get me one of these SSDs...

Birch


On Tuesday, March 12, 2013 6:19:01 PM UTC-4, Kostas kougios wrote:
Anyone knows which is the optimal CPU & number of cores to compile scala code (big projects)?

There is a small "benchmark" that we all can run:

git clone https://code.google.com/p/scalascriptengine/
cd scalascriptengine/scalascriptengine/
git checkout c2551de1fb3e2c61410817e2d590227b8d910fc1

run twice:
mvn -P scala2.10 clean package -DskipTests

Dave

unread,
Mar 21, 2013, 7:18:41 PM3/21/13
to scala...@googlegroups.com
"a  2.4GHz Intel Core i7"
Can you be more specific about the processor and also the jvm and OSX version?

Op vrijdag 22 maart 2013 00:14:05 UTC+1 schreef James Birchfield het volgende:

Alec Zorab

unread,
Mar 22, 2013, 4:20:00 AM3/22/13
to Dave, scala-user
21.3 sec. Late 2012 iMac, 3.4GHz i7, 1tb fusion drive.
I've got jvm 1.7.11 installed, but I'm not sure that's necessarily what maven is using.


Miles Sabin

unread,
Mar 22, 2013, 5:42:08 AM3/22/13
to Kostas kougios, scala...@googlegroups.com
On Tue, Mar 12, 2013 at 10:19 PM, Kostas kougios
<kostas....@googlemail.com> wrote:
> Anyone knows which is the optimal CPU & number of cores to compile scala
> code (big projects)?
>
> There is a small "benchmark" that we all can run:
>
> git clone https://code.google.com/p/scalascriptengine/
> cd scalascriptengine/scalascriptengine/
> git checkout c2551de1fb3e2c61410817e2d590227b8d910fc1
>
> run twice:
> mvn -P scala2.10 clean package -DskipTests
>
> (note down the number of seconds the 2nd time took to run)

At the other end of the spectrum, does anyone have on of these,

http://www.dell.com/uk/business/p/xps-13-l321x-mlk/pd?oc=sbnb1335&model_id=xps-13-l321x-mlk

(or something of a similar size and weight) to run this benchmark on?

Cheers,


Miles

--
Miles Sabin
tel: +44 7813 944 528
skype: milessabin
gtalk: mi...@milessabin.com
g+: http://www.milessabin.com
http://twitter.com/milessabin

Alec Zorab

unread,
Mar 22, 2013, 5:53:59 AM3/22/13
to Miles Sabin, Kostas kougios, scala-user
Can try it on a macbook air tonight if nobody else gets in there first.


Dave

unread,
Mar 22, 2013, 6:01:06 AM3/22/13
to scala...@googlegroups.com, Dave
And which i7 is it?

Op vrijdag 22 maart 2013 09:20:00 UTC+1 schreef AlecZorab het volgende:

Miles Sabin

unread,
Mar 22, 2013, 6:05:18 AM3/22/13
to Dave, scala...@googlegroups.com
On Fri, Mar 22, 2013 at 10:01 AM, Dave <dave.mah...@hotmail.com> wrote:
> And which i7 is it?

Ahh ... crap ... I actually meant the version which ships with Ubuntu
preinstalled,

http://www.dell.com/uk/business/p/xps-13-linux/pd.aspx?c=uk&cs=ukbsdt1&l=en&s=bsd&~ck=mn

Core i7-3537U, 8gigs of RAM and a 250gig SSD.

Cheers,


Miles

Alec Zorab

unread,
Mar 22, 2013, 6:10:43 AM3/22/13
to Dave, scala-user
according to wikipedia it's an i7-3770

Dave

unread,
Mar 22, 2013, 6:20:54 AM3/22/13
to scala...@googlegroups.com, Dave
Can't you get the cpu info directly via the command line? Wikipedia doesn't have to be true.

http://osxdaily.com/2011/07/15/get-cpu-info-via-command-line-in-mac-os-x/


Op vrijdag 22 maart 2013 11:10:43 UTC+1 schreef AlecZorab het volgende:

Alec Zorab

unread,
Mar 22, 2013, 6:37:15 AM3/22/13
to Dave, scala-user
If I wasn't at work, yes :)

Amir Moulavi

unread,
Mar 23, 2013, 8:18:13 AM3/23/13
to Miles Sabin, Dave, scala...@googlegroups.com
Yes, and the result is 37.501s

64-bit Ubuntu, Intel(R) Core(TM) i7-2637M CPU @ 1.70GHz, 4 GB of RAM and 250 GB SSD.

Cheers,
Amir

2013/3/22 Miles Sabin <mi...@milessabin.com>



--
M. Amir Moulavi
Java/Scala Consultant, Distributed Systems Engineer (MSc)
Jayway Stockholm

Dave

unread,
Mar 23, 2013, 8:28:20 AM3/23/13
to scala...@googlegroups.com, Miles Sabin, Dave
Thanks and the jvm ?

Op zaterdag 23 maart 2013 13:18:13 UTC+1 schreef Amir het volgende:

Miles Sabin

unread,
Mar 23, 2013, 9:21:38 AM3/23/13
to Amir Moulavi, Dave, scala...@googlegroups.com
On Sat, Mar 23, 2013 at 12:18 PM, Amir Moulavi <amir.m...@gmail.com> wrote:
> Yes, and the result is 37.501s
>
> 64-bit Ubuntu, Intel(R) Core(TM) i7-2637M CPU @ 1.70GHz, 4 GB of RAM and 250
> GB SSD.

Thanks :-)

That looks like a lower spec model though ... the one I linked to
ships with a Core i7-3537U and 8gigs of RAM.

Cheers,


Miles

langel...@gmail.com

unread,
Mar 23, 2013, 12:47:25 PM3/23/13
to scala...@googlegroups.com
Dell XPS 13 dev edition:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.794s
[INFO] Finished at: Sat Mar 23 16:43:44 WET 2013
[INFO] Final Memory: 14M/201M
[INFO] ------------------------------------------------------------------------

lscpu output:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 58
Stepping:              9
CPU MHz:               775.000
BogoMIPS:              4988.58
Virtualisation:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              4096K
NUMA node0 CPU(s):     0-3

Dave

unread,
Mar 23, 2013, 1:51:13 PM3/23/13
to scala...@googlegroups.com
Thanks,
do you also have the full name of the processor and the jvm version?
e.g.
Intel Core i7-2600K @ 3.40GHz
Hotspot 1.7.0_17 64 bit




Op zaterdag 23 maart 2013 17:47:25 UTC+1 schreef langel...@gmail.com het volgende:

langel...@gmail.com

unread,
Mar 23, 2013, 1:58:39 PM3/23/13
to scala...@googlegroups.com
Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz

java version "1.7.0_15"
OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10.1)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

Rex Kerr

unread,
Mar 23, 2013, 3:05:10 PM3/23/13
to Kostas kougios, scala...@googlegroups.com
On my three year old workstation:

model name    : Intel(R) Xeon(R) CPU           X5680  @ 3.33GHz

with data on 200 GB OCZ Vertex2 SSDs, and

$ java -versionjava version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)

I get 25.22 s.

The neat thing about this machine is not the total time but that I can also run nine instances of my data processing application simultaneously and only slow down to 27.8s.

On my new Asus UX31A (128G SSD):

model name    : Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz

with

$ java -version
java version "1.7.0_15"
OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10)

OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

I get 39.95 seconds.

  --Rex

Gilberto Garcia

unread,
Mar 23, 2013, 3:30:53 PM3/23/13
to scala...@googlegroups.com
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.213s
[INFO] Finished at: Sat Mar 23 16:27:35 BRT 2013
[INFO] Final Memory: 11M/151M

lscpu output
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 42
Stepping:              7
CPU MHz:               800.000
BogoMIPS:              4392.24
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              6144K
NUMA node0 CPU(s):     0-7


JVM

java version "1.7.0_13"
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)


Maven

Apache Maven 3.0.4 (r1232337; 2012-01-17 06:44:56-0200)
Java version: 1.7.0_13, vendor: Oracle Corporation
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.8.3-2-arch", arch: "amd64", family: "unix"



Rex Kerr

unread,
Mar 23, 2013, 3:46:09 PM3/23/13
to Gilberto Garcia, scala...@googlegroups.com
Can you give the conventional name of the CPU as well as the CPU family/model ID numbers?  You can get this off cat /proc/cpuinfo | grep "model name" among other things.  It's hard to match up what you might buy to the family/model numbers, since the model number is not all that specific.  (E.g. i3, i5, and i7 on the same process size all end up with the same model number).

  --Rex

Gilberto Garcia

unread,
Mar 23, 2013, 3:55:22 PM3/23/13
to Rex Kerr, scala...@googlegroups.com
Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
RAM: 8G
256GB SSD

Miguel Garcia

unread,
Mar 23, 2013, 3:59:00 PM3/23/13
to scala...@googlegroups.com

In case you've tried everything (overclocking, RAM disk) and still crave for compilation speed, you might want to try the new (some dare say experimental) backend.

Seeing is believing: 15% speedup on average. Details in Section 4 (Getting Started) at http://magarciaepfl.github.com/scala/


Miguel
http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/




On Tuesday, March 12, 2013 11:19:01 PM UTC+1, Kostas kougios wrote:
Anyone knows which is the optimal CPU & number of cores to compile scala code (big projects)?

There is a small "benchmark" that we all can run:

git clone https://code.google.com/p/scalascriptengine/
cd scalascriptengine/scalascriptengine/
git checkout c2551de1fb3e2c61410817e2d590227b8d910fc1

run twice:
mvn -P scala2.10 clean package -DskipTests

(note down the number of seconds the 2nd time took to run)

On my machine (4 cores, AMD Phenom(tm) II X4 910e Processor):

Total time: 42.168s

lscpu output:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             AuthenticAMD
CPU family:            16
Model:                 4
Stepping:              3
CPU MHz:               2600.000
BogoMIPS:              5200.20
Virtualization:        AMD-V
L1d cache:             64K
L1i cache:             64K
L2 cache:              512K
L3 cache:              6144K
NUMA node0 CPU(s):     0-3




Rex Kerr

unread,
Mar 23, 2013, 4:10:42 PM3/23/13
to Miguel Garcia, scala...@googlegroups.com
Speaking of which, any idea how much of the time in the compiler is spent in maps/sets where Java's are 2-3x faster?  Could you get a similarly large improvement by converting every map and set to the Java equivalent?

(More work, but better: comprehensive performance-oriented rewrite of map and set.)

  --Rex

Kevin Wright

unread,
Mar 23, 2013, 4:11:01 PM3/23/13
to Miguel Garcia, scala-user

Also...  Can everyone go back and note what file system they used?

I've already seen that xfs and btrfs make a surprising difference for some workloads,  but don't have any quantitative numbers for scalac.

Rex Kerr

unread,
Mar 23, 2013, 4:12:11 PM3/23/13
to Kevin Wright, Miguel Garcia, scala-user
All ext4 for me.
  --Rex

Gilberto Garcia

unread,
Mar 23, 2013, 4:12:11 PM3/23/13
to Kevin Wright, Miguel Garcia, scala-user
I'm using ext4

Paul Keeble

unread,
Mar 23, 2013, 4:15:34 PM3/23/13
to scala-user

NTFS on windows 8 and on the NAS ext3 over samba.

Miguel Garcia

unread,
Mar 23, 2013, 4:23:57 PM3/23/13
to scala...@googlegroups.com, Miguel Garcia

At the risk of sounding scala-internals , there are some ideas on faster set/map in the compiler:
  https://issues.scala-lang.org/browse/SI-7149

The new backend embodies algorithmic optimizations, but not set/map related, with the exception of
  https://github.com/magarciaEPFL/scala/commit/1e65ac1c363ab8b7a3d139cc9861d86a65f397c1

Miguel
http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/

Andrei Tkachyov

unread,
Mar 23, 2013, 4:34:52 PM3/23/13
to scala...@googlegroups.com
Lenovo T420s laptop, CPU:  i7-2640M @ 2.80GHz, Intel SSD 160Gb, Win7, NTFS:

[INFO] --------------------------------------------------------
[INFO] Total time: 30.521s
[INFO] Finished at: Sat Mar 23 22:29:43 EET 2013
[INFO] Final Memory: 13M/218M
[INFO] --------------------------------------------------------

Örjan

unread,
Mar 23, 2013, 5:46:59 PM3/23/13
to scala...@googlegroups.com

Installed Physical Memory (RAM) 16,0 GB
Processor Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz, 3201 Mhz, 6 Core(s), 12 Logical Processor(s)

C:\WINDOWS\system32>fsutil fsinfo ntfsinfo c:
NTFS Version   :                  3.1
LFS Version    :                  2.0
Bytes Per Sector  :               512
Bytes Per Physical Sector :       512
Bytes Per Cluster :               4096
Bytes Per FileRecord Segment    : 1024


MAVEN_OPTS="-Xmx3G -XX:MaxPermSize=128m -XX:PermSize=128m"

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.064s
[INFO] Finished at: Sat Mar 23 21:59:08 CET 2013
[INFO] Final Memory: 11M/244M
[INFO] ------------------------------------------------------------------------

$ mvn -version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)
Maven home: c:\java\apache-maven-3.0.5
Java version: 1.7.0_17, vendor: Oracle Corporation
Java home: c:\Program Files\Java\jdk1.7.0_17\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 8", version: "6.2", arch: "amd64", family: "windows"
$ gradle -version

------------------------------------------------------------
Gradle 1.4
------------------------------------------------------------

Gradle build time: den 28 januari 2013 kl 3:42 UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.7.0_02 (Oracle Corporation 22.0-b10)
OS: Windows NT (unknown) 6.2 amd64


orjan@GATEWAY /c/git/scalascriptengine/scalascriptengine ((c2551de...))
$ gradle clean cS
:clean
:compileJava UP-TO-DATE
:compileScala
BUILD SUCCESSFUL

Total time: 13.248 secs

Andrei Tkachyov

unread,
Mar 23, 2013, 6:31:22 PM3/23/13
to scala...@googlegroups.com
MBP, CPU: i5 @2.53GHz, HDD, OS X

INFO] ------------------------------------------------------------------------
[INFO] Total time: 44.573s
[INFO] Finished at: Sun Mar 24 00:29:00 EET 2013
[INFO] Final Memory: 9M/81M
[INFO] ------------------------------------------------------------------------

Dave

unread,
Mar 23, 2013, 7:46:26 PM3/23/13
to scala...@googlegroups.com
I get when I do
gradle clean cS:


        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.Main.main(Main.java:39)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots
trap.java:50)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j
ava:32)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: start
up failed:
build file 'C:\Users\Dave\scalascriptengine\scalascriptengine\build.gradle': 48:
 unexpected token: import @ line 48, column 1.
   import org.gradle.*
   ^

1 error

C:\Users\Dave\scalascriptengine\scalascriptengine>gradle -version

------------------------------------------------------------
Gradle 1.4
------------------------------------------------------------

Gradle build time: maandag 28 januari 2013 3:42:46 uur UTC

Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.6.0_43 (Sun Microsystems Inc. 20.14-b01)
OS: Windows 7 6.1 x86


Is there something missing?



Op zaterdag 23 maart 2013 22:46:59 UTC+1 schreef Örjan het volgende:

Jun Yamog

unread,
Mar 23, 2013, 8:34:11 PM3/23/13
to scala-user
I am running an old thinkpad (last of the 7 row keyboard), my son is using it on the foreground and run this over ssh

Total time: 24.135s
Finished at: Sun Mar 24 13:10:30 NZDT 2013
Final Memory: 12M/212M

Ubuntu 12.04, ext4, i7-2820QM CPU @ 2.30GHz, m4 SSD
OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.04.1)

--------

rMBP 13" (all show, not much go)
Total time: 34.775s
Finished at: Sun Mar 24 13:23:53 NZDT 2013
Final Memory: 9M/81M

OS X 10.8.3 i5-3210M @ 2.50Ghz

Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)


Both have no tweaks.  Any suggested tweaks?




--

François Garillot

unread,
Mar 26, 2013, 6:01:41 AM3/26/13
to scala...@googlegroups.com
Well, let's see :
Total time: 15.152s Thinkpad T530, Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
Total time: 20.461s Thinkpad X220, Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
Total time: 23.640s Mid-2010 top of the line iMac with quad core Lynnfield, Intel(R) Core(TM) i7 CPU 870  @ 2.93GHz

I would expect better results with a RAMdisk.

-- 
FG

Dave

unread,
Mar 26, 2013, 10:00:52 PM3/26/13
to scala...@googlegroups.com
With the gradle script and JDK6 it is 8 seconds less than maven on my laptop. Only with JDK7 it hangs.

Op dinsdag 26 maart 2013 11:01:41 UTC+1 schreef François Garillot het volgende:

Dave

unread,
Mar 27, 2013, 2:07:44 PM3/27/13
to scala...@googlegroups.com

kostas....@googlemail.com

unread,
Mar 27, 2013, 2:11:39 PM3/27/13
to Dave, scala...@googlegroups.com
Seeing the results, i think we need to compile a bigger project to get more accurate measurements.

Sent from my self

On 27 Mar 2013, at 18:07, Dave <dave.mah...@hotmail.com> wrote:

--
You received this message because you are subscribed to a topic in the Google Groups "scala-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-user/PJbQefbsn0M/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to scala-user+...@googlegroups.com.

Dave

unread,
Mar 28, 2013, 8:00:32 AM3/28/13
to scala...@googlegroups.com, Dave, kostas....@googlemail.com
What is the reason that maven is used instead of sbt?

Op woensdag 27 maart 2013 19:11:39 UTC+1 schreef kostas....@googlemail.com het volgende:

Konstantinos Kougios

unread,
Mar 28, 2013, 8:01:14 AM3/28/13
to Dave, scala...@googlegroups.com
well, the project is a maven project. No special reason.
Reply all
Reply to author
Forward
0 new messages