That's a possibility, but how would you know when x changes, or is
assigned to a different name?
Henry Rich
On 2/1/2022 8:27 PM, Elijah Stone wrote:
On Mon, 31 Jan 2022, Henry Rich wrote:
The deficiency in J is that m&i. gives you a hashtable for searching
m, but if you modify m you have to recalculate the hash from
scratch. This makes m&i. a good read-mostly Dictionary but slow for
frequent updates.
Why not cache the hash table for x when computing x i. y, and update
it in-place when x is updated in-place? That should provide ideal
performance without requiring any changes to language semantics.
-E
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm