diff options
| author | Pierre-Marie Pédrot | 2014-11-10 16:37:10 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2014-11-10 18:08:17 +0100 |
| commit | dc334ef9fb37894658bdc51b931a0a7784dbdaa3 (patch) | |
| tree | 11fbcb8f0ca164c7b215bac00e1df954da2c7e9a /kernel/modops.ml | |
| parent | 33bf52f9881fb457f566478ade3f92550b91c6ba (diff) | |
Evar normalization is now done eagerly.
As witnessed in the ProjectiveGeometry contrib, some evar normalization were
taking ages because of an exponential behaviour due to a call-by-name
substitution: when normalizing an evar, its arguments were substituted right
away and the resulting term was then normalized, leading to a potential
duplication of normalizations.
Now we normalize evar arguments before substituting them, in a call-by-value
fashion. It makes examples from ProjectiveGeometry compile instanteanously
when they were killing the machine due to excessive memory allocation before
the patch.
Note that there is a tension here: we may be normalizing evar arguments too
eagerly, and try a call-by-need approach instead. To choose which particular
strategy we use, we should do some benchmarks... On stdlib, call-by-value
and call-by-need seem indistinguishable. To be continued?
Diffstat (limited to 'kernel/modops.ml')
0 files changed, 0 insertions, 0 deletions
