Performance - Windows 7 - JAVA 1.7 vs .NET 2.0

MathParser.org - mXparser - logo - High PerformanceHardware & software used for performance testing

*** If you found the software useful donation is something you might consider πŸ™‚ ***

If you found the software useful donation is something you might consider :-)

mXparser performance tests - Windows 7 - JAVA 1.7 vs .NET 2.0

  • Windows 7 32 bit (laptop)
  • Intel (R) Core(TM) i5-4300 CPU @1.90 GHz 2.50 GHz
  • 4GB RAM
  • Java version - JDK 1.7.0_45
  • .NET version - CLR 2.0.50727
  • Threads number: 4
Id Oper / Task Iter [#] JAVA - Iter / sec .NET - Iter / sec JAVA / .NET [x] Test descr
0 2+3 20 m 4.4 m/s 4.0 m/s 1.1 x Simple calculations - addition. Expression created once. Iteration: repeatedly recalculated same expression.
1 2*3 20 m 4.5 m/s 3.9 m/s 1.2 x Simple calculations - multiplication. Expression created once. Iteration: repeatedly recalculated same expression.
2 2/3 20 m 4.4 m/s 3.9 m/s 1.1 x Simple calculations - division. Expression created once. Iteration: repeatedly recalculated same expression.
3 2^3 20 m 4.1 m/s 3.7 m/s 1.1 x Simple calculations - power. Expression created once. Iteration: repeatedly recalculated same expression.
4 sin(3) 20 m 2.9 m/s 3.0 m/s 0.9 x Simple calculations - sinus. Expression created once. Iteration: repeatedly recalculated same expression.
5 2+3+4 20 m 2.4 m/s 2.2 m/s 1.1 x Simple calculations - 2 additions. Expression created once. Iteration: repeatedly recalculated same expression.
6 2+3+4+5 20 m 1.5 m/s 1.5 m/s 1.0 x Simple calculations - 3 additions. Expression created once. Iteration: repeatedlyrecalculated same expression.
7 2+(3+4)+5 20 m 1.2 m/s 1.1 m/s 1.1 x Simple calculations - 3 additions + 1 parenthesis. Expression created once. Iteration: repeatedly recalculated same expression.
8 (2+3)+(4+5) 20 m 0.9 m/s 0.9 m/s 1.0 x Simple calculations - 3 additions + 2 brackets. Expression created once. Iteration: repeatedly recalculated same expression.
9 2+(3+(4+5)) 20 m 0.9 m/s 0.9 m/s 1.0 x Simple calculations - 3 additions + 2 brackets. Expression created once. Iteration: repeatedly recalculated same expression.
10 sin(2+(3*4)^2)/10 20 m 615 th/s 674 th/s 0.9 x Combination of different operations. Expression created once. Iteration: repeatedly recalculated same expression.
11 2+x 20 m 4.1 m/s 3.7 m/s 1.1 x Simple calculations - addition with argument. Expression created once, containing argument 'x'. Iteration: argument value is being modified (increased), then expression is recalculated
12 3f(x.y)-(2x+3*y) 2 m 322 th/s 347 th/s 0.9 x User defined function f(x,y)=3x+4y. Expression &Function created once, containing argument 'x'. Iteration: argument value is being modified (increased), then expression is recalculated
13 Constant c = new Constant("c". 5) 1 m 0.9 m/s 1.0 m/s 0.9 x Creating constants: Iteration: Constant c = new Constant("c", 5)
14 Constant c = new Constant("c=5") 100 th 12.8 th/s 4.4 th/s 2.9 x Creating constants: Iteration: Constant c = new Constant("c=5")
15 Argument x = new Argument("x". 5) 1 m 0.9 m/s 1.1 m/s 0.8 x Creating arguments: Iteration: Argument x = new Argument("x", 5)
16 Argument x = new Argument("x=5") 100 th 12.6 th/s 4.3 th/s 2.9 x Creating arguments: Iteration: Argument x = new Argument("x=5")
17 Function f = new Function("f". "x+y". "x". "y") 1 m 275 th/s 341 th/s 0.8 x Creating functions: Iteration: Function f = new Function("f", "x+y", "x", "y")
18 Function f = new Function("f(x.y)=x+y") 100 th 6.0 th/s 1.8 th/s 3.4 x Creating functions: Iteration: Function f = new Function("f(x,y)=x+y")
19 Expression e = new Expression("sin(2+(3*4)^2)/10") 1 m 10.6 m/s 9.2 m/s 1.2 x Creating expressions: Iteration: Expression e = new Expression("sin(2+(3*4)^2)/10")
20 Expression e = new Expression("sin(2+(3*4)^2)/10") 100 th 1.2 th/s 0.3 th/s 3.8 x Creating expressions + checking syntax: Iteration: Expression e = new Expression("sin(2+(3*4)^2)/10")

Run your own performance tests

JAVA


java -cp mxparser.jar org.mariuszgromada.math.mxparser.regressiontesting.PerformanceTests

.NET - i.e.Β from the PowerShell


[Reflection.Assembly]::LoadFile("full\exact\path\to\mxparser.dll")
[org.mariuszgromada.math.mxparser.regressiontesting.PerformanceTests]::Start()

*** If you found the software useful donation is something you might consider πŸ™‚ ***

If you found the software useful donation is something you might consider :-)

Enjoy πŸ™‚

Best regards,

Mariusz Gromada

Download latest release – v.4.0.0.2: bin + doc + src (.zip 10.7 MB)

Download latest release – v.4.0.0.2: bin only (.zip 3.04 MB) – separate binaries for java: 1.5, 1.6, 1.7, 1.8; .NET: 2.0, 3.0, 3.5, 4.0, 4.5, 4.6, .NET Core, .NET Standard, .NET PCL, Xamarin.Android, Xamarin.iOS

Source code .zipSource code .tar.gz View on GitHubMathSpace.pl