We are about to switch to a new forum software. Until then we have removed the registration on this forum.
You are probably looking at this because of the 'Faster than Java' tag line which is the truth but not the whole truth :) . To find out more read on.
Jasmine is a numerical expression and algorithm evaluator so in some respects it is similar to QScript. Although QScript is extremely versatile and extensible these are included at the expense of speed. Jasmine is fast, extremely fast, in fact faster that Java when evaluating expressions (although not as fast when evaluating algorithms)
The following code calculates the distance between 2 points and demonstrates how easy it is to use Jasmine.
String expr = "sqrt((x0 - x1)*(x0 - x1) + (y0 - y1)*(y0 - y1))"; Expression e = Compile.expression(expr, true); System.out.println("Build time = " + e.getBuildTime() + " nanoseconds"); float d = e.eval(-5, 7, 4, 9).answer().toFloat(); System.out.println("Distance = " + d); System.out.println("Eval time = " + e.getEvalTime() + " nanoseconds");
Most of the work is done in line 2 where the string expression is converted into an Expression object which is then used to evaluate the expression. Jasmine parses the expression and then uses the excellent ASM byte code manipulation library to convert it to Java byte code. This is similar to what the Java compiler does but does it at run time. Once compiled the expression can be evaluated as many times as we like, it is this evaluation (line 4) which is faster than Java.
Algorithms include conditional statements, loop constructs and support for variables.
You can install this library through the PDE Add Library option.
Want to know more then visit the website.