Skip to content

Faster again, plus a bug fix in size calculations (v0.0.5 reprise + Julia 1.0))

Compare
Choose a tag to compare
@mroughan mroughan released this 17 Sep 06:13
· 57 commits to master since this release

The main fix here is that caches were all storing their own versions of surreals for each case, e.g., for sums each x+y had a different entry. However, this is wasteful, so created a central list of all surreals, which with index into by the hashes, which are all that are stored in the indivudual caches now. This reduces the memory footprint, but had another side benefit, which is that in some places I was creating two "different" surreal forms, in the sense that different memory was being used even though the surreals were identical. For example 1+3 == 2 + 2 but these would each have resulted in identical sureals, but would have used two separate copies of the same surreal. Indexing with a level of redirection by hash avoids this issue. The results are faster, and use less memory, and calculations of size of resulting DAGs prior to this would have had an error.

  • There was yet another little bug in 0.0.5 where memory wasn't reused properly in one specific case. This is now fixed, and the shorthands now report the operands used to construct a form as a means of tracing such bugs -- but makes it nice to understand the ops that created a surreal.