in reply to rough start of an axml compiler
If I understand your architecture properly, you have several invariants that are getting set up in sortofcompileit on every call; if you pulled those out into package variables and set them up once (with an init method/sub), you'd save time on every subsequent call.
And this it totally headed in a good direction - real "compilation" of the aXML code! If you memoized (cf. Memoize) the calls to sortofcompile, you might be able to get another free speedup from Memoize's caching. As long as a given parameter set always results in the same output, Memoize will help. If there are side effects that might change the result, then it won't help (e.g., memoizing a random number generator would make it seriously unusable, if very fast!).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: rough start of an axml compiler
by Logicus (Initiate) on Jul 21, 2011 at 19:53 UTC | |
by pemungkah (Priest) on Jul 22, 2011 at 06:35 UTC | |
by Logicus (Initiate) on Jul 22, 2011 at 06:42 UTC |