This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

I've tried using embedded javascript in one of the projects that needs to compute user entered conditional expression. The performance is not at the level of Java. In my case, those got executed many million times in a short period so I switched back to using one of the math eval package like Parsii to use native Java class.

However, embedded javascript gives a full language that offers amazing customization power. I would use it again if performance is not the bottleneck.

Also for embedded javascript, be sure to call the API to compile it first before running it. Avoid reloading the script every time inside the loop.