From: Martin H. <ma...@he...> - 2004-03-05 22:38:01
|
Hi Xavier, >>I will do a rewrite from scratch, and optimize the whole thing so that it >>- uses our Namespace::delimiter >>- does a pre-compile of the expression and stores it as a tree > > Which expression do you want to pre-compile ? I don't understand this one ! I'm not sure if this is a simple language problem (possible, since most here are not native speakers to English), or something else - but to me, "expression" is a term very commonly used when building compilers or parsers. In specific, the "expression" Michael was referring to was the different strings given to the evaluator to evaluate (actually, the first parameter of the Eval function, which is even called "expression"). So, in short, anything specified in the config as "expression", "expression2", "prefix" or "postfix" (maybe some others that I haven't come across yet). The idea is to avoid having to re-parse a string over and over again, when it already has been parsed at an ealier point in time. By saving the "pre-compiled" version, and re-using that one, one saves time (CPU cycles). This is a very common thing to do, and can result in significant reduction of CPU usage, when the expressions used get more complicated (this concept is heavily used for "prepared statements" in Databases, for example, since parsing complex SQL statements and running the optimizer on that can be _rather_ expensive). HTH Martin |