groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: pure JVM GroovyLab without native libs that perplex things!!
Date Sat, 30 Jan 2016 14:36:20 GMT
On 30.01.2016 23:34, sterg wrote:
> Hi all,
> after trying to speed up numerical computations with native C/C++ code
> in GroovyLab I found that it is not worth the complexity and instability,
> because in most cases C/C++ code is slower than Java code!!
> Therefore I removed the native libs from the current version of GroovyLab

you know the matter with those things is actually quite simple. If a 
Java solution takes y time, and a C solution x time you have y=t1+x+t2 
as where they meet. What t1 and t2 are you ask? That is the code 
converting call patterns, type, the actual method call and so on. 
Considering t1 and t2 constants, they can be still very dominating for 
small x. Thus you can the advantage only for big x. In other words, if 
want to multiplicate two matrix, then it might not be wort.... if you do 
a hundred, it can turn out different... and on a cuda architecture, you 
will want to have many many operations done in parallel as well

bye blackdrag

View raw message