A
Aaron Fude
Hi,
I use this trick for parsing mathematical expressions, that when a user
enters sin(x) + cos(x) my program pastes that line into a java class
"template", writes the code to some file, runs a shell command to compile it
and then loads the class. There are several advantages over something like
"JEP". First, I can use any java expression. Second, compiled code then runs
much faster.
This works but takes too long. Is there a way to speed this up by doing
everything in memory and avoid writing to files and running compilation
scripts.
Many thanks in advance,
Aaron Fude
I use this trick for parsing mathematical expressions, that when a user
enters sin(x) + cos(x) my program pastes that line into a java class
"template", writes the code to some file, runs a shell command to compile it
and then loads the class. There are several advantages over something like
"JEP". First, I can use any java expression. Second, compiled code then runs
much faster.
This works but takes too long. Is there a way to speed this up by doing
everything in memory and avoid writing to files and running compilation
scripts.
Many thanks in advance,
Aaron Fude