Home > Jace.NET > Comparing the performance of Jace.NET and NCalc

Comparing the performance of Jace.NET and NCalc

I started the development on Jace because I wanted to develop a high performing mathematical formula execution engine that worked on all the major Microsoft platforms (.NET, Windows RT, Windows Phone 7.5 and Windows Phone 8). Jace was not the first such framework, other calculation engines existed already; like for example NCalc. Unfortunately, to my knowledge no engine was available that also supported newer platforms like Windows RT or Windows Phone.

I decided to compare the performance of Jace with an important competitor: NCalc. I downloaded NCalc 1.3.8.0 and Jace 0.7 using NuGet. Both engines were used with the default settings and were given the same 10 random generated formulas with 3 variables. Each function was executed “n” times with random input.

The graph below clearly shows that Jace.NET greatly outperforms NCalc. The x-axis is showing the total number of formulas executed and the y-axis the total time in milliseconds.

Benchmark Jace.NET vs. NCalc (time in ms.)

As the developer behind Jace, I am very happy to notice that the time I have spent on the dynamic compiler of Jace is paying off. It is responsible for the high performance of execution. This dynamic compiler is available on all platforms Jace supports (.NET, Windows RT, Windows Phone 7.5 and Windows Phone 8) and it is the default setting.

The source of the application used for the benchmark can be found at:
https://skydrive.live.com/redir?resid=7A3CD9AFBD57E81E!761

Homepage NCalc:
http://ncalc.codeplex.com/

Homepage Jace.NET:
https://github.com/pieterderycke/Jace

Advertisements
Categories: Jace.NET
  1. Ersin Caliskan
    December 14, 2012 at 22:21

    Hi, performance seems good but jace is thread safe ?

    • pieterderycke
      December 15, 2012 at 08:37

      yes, Jace is completely thread safe.

  2. Anton Christiansen
    January 12, 2015 at 08:28

    Sure yours is faster, but yours cannot handle string and Ncalc can…

    • pieterderycke
      January 20, 2015 at 11:37

      Could you explain me for which cases you need to handle strings? If you have a valid case, I can add this functionality into Jace

      • Anton Christiansen
        January 20, 2015 at 12:29

        That could be great; I have been looking for a mini scripting language / Evaluator for my app, and yours was the best candidate, but since it could not handle String input and output, I had to choose JInt for C#.

        The scripting language would have access to a Class that have some methods that’s takes input and output as string. After all yours are the best on the “market”. Sincerely Anton Christiansen.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: