Performance

MathParser.org-mXparser has been downloaded more than 3.500.000 times!

TO SUPPORT MY WORK, ORDER A COMMERCIAL LICENSE
THANK YOU!

Tutorial Math Collection API spec Download

Performance tests – Source code

Recommended tutorial readings before Performance tests analysis

mXparser was separately written in JAVA and C# – this allows to cover significant part of possible applications and platforms, including JAVA, Android, .NET and MONO. Solution performance highly depends on the usage type (different API functions, inserted formulas), thus performance tests were prepared in several different scenarios.

Calculation tests

  • Simple calculation – expression defined once, the recalculated.
  • Expression with argument – expression  defined once, then recalculated – this scenario gives information how mXparser behaves for typical application, where argument is changing without changing the formula.
  • Expression with user defined function – expression  defined once, then recalculated – this is another example of typical application, where expression and function is defined once, and only recalculated after changing arguments values.

API tests

Definition of constant, argument, functions, expression – currently mXparser supports two types of constructors:

  • One string, i.e. “x = 5”, “f(x,y) = sin(x) + cos(y)” – much slower method, as it requires deeper checking using regular expressions, then tokenizing for extraction of names, etc.
  • Object name, object params much faster, only object name is being verified against specified regular expressions.

Conclusions

  • JAVA 1.8 API is much faster than .NET when we consider Windows 10 and the newest .NET 4.0 and above
  • Mono 4.2 API on Windows 10 is much slower than .NET 4.0 and above
  • JAVA 1.7 API is only slightly faster than .NET in case of Windows 7 and the .NET 2.0
  • JAVA 1.5 API is far much slower than JAVA 1.6, 1.7, 1.8
  • Mono 3.2.1 API is much faster than JAVA 1.8 on Rapsberry Pi 2

Please refer to the performance test details.

Enjoy 🙂

Nuget – Package Manager

Install-Package MathParser.org-mXparser -Version 6.0.0

Nuget – .NET CLI

dotnet add package MathParser.org-mXparser --version 6.0.0

Nuget – Package Reference

<PackageReference Include="MathParser.org-mXparser" Version="6.0.0"/>

Maven – Dependency

<dependency>
<groupid>
org.mariuszgromada.math</groupid>
<artifactid>
MathParser.org-mXparser</artifactid>
<version>
6.0.0</version>
</dependency>

Maven – Gradle

implementation 'org.mariuszgromada.math:MathParser.org-mXparser:6.0.0'

CMake – Dependency / FetchContent

include(FetchContent)
FetchContent_Declare(
MathParserOrgMxParser
GIT_REPOSITORY
https://github.com/mariuszgromada/MathParser.org-mXparser.git
SOURCE_SUBDIR
CURRENT/cpp/lib)
FetchContent_MakeAvailable(
MathParserOrgMxParser)
target_link_libraries(YourExecutable
MathParserOrgMxParser)

GitHub

git clone https://github.com/mariuszgromada/MathParser.org-mXparser

OTHER DOWNLOAD OPTIONS

Download latest release – v.6.0.0 Picon: .NET bin onlyDownload latest release – v.6.0.0 Picon: JAVA bin onlyDownload latest release – v.6.0.0 Picon: bin + doc

NEWS FROM MATHPARSER.ORG
SOURCE CODE

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

My other creative spaces

DONATION
Did you find the software useful?
Please consider donation 🙂
DONATE