solomono / kiama

Automatically exported from code.google.com/p/kiama
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Explore caching constructors in term duplication during rewriting #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The dup method in the Rewriter uses reflection to find the primary constructor 
of a term class so 
that it can create a new term with the constructor but possibly different 
children. We could cache 
these which might usefully limit the amount of reflection that is done. Do some 
measurements to 
see if this helps in typical cases.  Is there some non-performance impacting 
way to make it 
optional?

Original issue reported on code.google.com by inkytonik on 11 Aug 2009 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by inkytonik on 7 May 2010 at 3:52

GoogleCodeExporter commented 9 years ago

Original comment by inkytonik on 26 Jul 2010 at 5:10

GoogleCodeExporter commented 9 years ago
Implemented caching for reconstruction of products. When run on all of the 
rewriter tests it didn't seem to help much, nor did it hinder much. For this 
reason, we are leaving it out at the moment, but will reconsider if it becomes 
clear with further use that this optimisation would be useful.

Original comment by inkytonik on 24 Jan 2011 at 12:51