On Sat, 28 Aug 2021, Henry Rich wrote:

Large improvement would require heroic intervention: parsing & caching sentences on the fly & watching assignments to make sure the cached parse is valid.  I would rather avoid that.

The technique has been implemented, to great effect - http://www.softwarepreservation.org/projects/apl/Papers/DYNAMICINCREMENTAL

That implementation placed the invalidation in the parsed (and compiled) sentence itself, rather than invalidating existing sentences on assignment, which simplified matters; before a sentence is executed, the inferred nameclasses of its referents are verified. This is much simpler and easier to get right, and retains similar performance (especially with modern branch predictors).

That being said, if the parser is a bottleneck for some code, then it is likely doing something wrong and should perhaps not be encouraged :)

 -E
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to