Groovy: Poor multithreading performance and slow computing compared to Java?

According to the Groovy article has

Unfortunately, at the same time, Groovy is very slow at runtime. As the person who did a lot to improve Groovy's performance, I can probably talk about this very openly. Groovy is very slow. You can easily expect that some Groovy calculations or data transformations rewritten in Java will be 3-5 times faster. Usually this ratio is 8-12, and sometimes higher. Someone may say that Java is always on our service, and no one uses Groovy for computing or data processing ... But, hey, this is exactly my point of view - why should we limit ourselves only to writing or processing simple web pages ?

What's even worse is that Groovy does not scale well for multi-core computers, which means that multiple threads running code compiled with Groovy really prevent the other from being. This is not a problem for many applications, but for many others it’s just a show stopper.

Can anyone confirm or refute these paragraphs?

I am particularly concerned about multithreaded performance.

+1
source share
4 answers

Efforts to increase Groovy speed are ongoing, but it should be said that 9 times in 10, performance is not a problem.

, , Java ( Java Groovy), , Groovy, Groovy ++, Groovy, ( - , , , Java)

Groovy 1.8b4 ( -), GPars .

GPars Java Groovy , Java Groovy.

{ 2012}

Groovy 2.0 CompileStatic, ( Groovy ++ ). ...

+6

8-12 . - Java Groovy ... , , - -?

! Groovy 1.8 !; -)

" Groovy 1.8.x fib (42) 3,8 ( 12% , Java, Groovy 1.0). " " Java.

: http://www.wiki.jvmlangsummit.com/images/0/04/Theodorou-Faster-Groovy-1.8.pdf

Groovy vs. Scala ! , :

" , Groovy . Groovy 1.8 jlab (http://code.google.com/p/jlabgroovy/) Scala ScalaLab (http://code.google.com/p/scalalab)!! "

: http://groovy.329449.n5.nabble.com/Great-improvements-in-Groovy-s-performance-for-numerical-computing-td4334768.html

GPars!

+6

Groovy (, , 2 ):

Groovy . , 60% BigDecimal.divide(). , Groovy - BigDecimal. , , Java , 90%.

+3
source

"Groovy 1.8.x prototype for fib (42) takes about 3.8 s (only 12% slower than Java, a hundred times faster than Groovy 1.0). Therefore, we can no longer encourage people to write such" hot spots " in Java.

I just tried, and this is extremely inaccurate. Groovy 1.8 for fib (42) is ~ 25 times slower than java. In my testing, java fib (42) takes 2 seconds, where 1.8 and 1.8.8 take about 52 seconds.

Groovy is still slow ....

+2
source

Source: https://habr.com/ru/post/1773208/


All Articles