colah/ImplicitCAD — pull request #80 by bgamari (2012-11-30 04:07:00+00:00)
Title: Refactoring in preparation for `AffineSpace`

These are all of the changes in my `affine-space` branch up to the actual switch over to `Point`, which as has been documented elsewhere still suffers from a performance hit. These patches, however, incur no such hit. In fact, if anything timings improve,

Before,
```
benchmarking Object 1/STL write
collecting 100 samples, 1 iterations each, in estimated 753.4876 s
mean: 251.7557 ms, lb 246.6139 ms, ub 259.6708 ms, ci 0.950
std dev: 32.41427 ms, lb 23.54860 ms, ub 45.75001 ms, ci 0.950
found 8 outliers among 100 samples (8.0%)
3 (3.0%) high mild
5 (5.0%) high severe
variance introduced by outliers: 86.287%
variance is severely inflated by outliers

benchmarking Object 2/STL write
collecting 100 samples, 1 iterations each, in estimated 135.6434 s
mean: 1.753192 ms, lb 1.505299 ms, ub 2.359345 ms, ci 0.950
std dev: 1.836184 ms, lb 552.7734 us, ub 3.251082 ms, ci 0.950
found 17 outliers among 100 samples (17.0%)
16 (16.0%) high severe
variance introduced by outliers: 98.986%
variance is severely inflated by outliers
```

After,
```
benchmarking Object 1/STL write
collecting 100 samples, 1 iterations each, in estimated 741.8008 s
mean: 239.5342 ms, lb 238.1994 ms, ub 240.8767 ms, ci 0.950
std dev: 6.889492 ms, lb 6.210129 ms, ub 7.795821 ms, ci 0.950
variance introduced by outliers: 23.820%
variance is moderately inflated by outliers

benchmarking Object 2/STL write
collecting 100 samples, 1 iterations each, in estimated 102.2284 s
mean: 1.457241 ms, lb 1.406844 ms, ub 1.537824 ms, ci 0.950
std dev: 319.5546 us, lb 232.6374 us, ub 493.9032 us, ci 0.950
found 22 outliers among 100 samples (22.0%)
7 (7.0%) high mild
15 (15.0%) high severe
variance introduced by outliers: 95.701%
variance is severely inflated by outliers
```

Moreover, these are nice cleanups and merging them early will greatly reduce the work required to keep `affine-space` up to date until the performance issues have been sorted out.