about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2014-07-06 21:19:12 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2014-07-11 17:32:18 +0200
commitc8ae44682d76bb40eb1471eeb42603eaecd0b392 (patch)
tree17350372e31066616c4d1492b3006d9bca9f06ab /src/rustllvm/RustWrapper.cpp
parent5d1bdc320ba5304854f409ba68060f5739bca044 (diff)
downloadrust-c8ae44682d76bb40eb1471eeb42603eaecd0b392.tar.gz
rust-c8ae44682d76bb40eb1471eeb42603eaecd0b392.zip
`O(n*k)` code-size deriving on enums (better than previous `O(n^k)`).
In the above formulas, `n` is the number of variants, and `k` is the
number of self-args fed into deriving.  In the particular case of
interest (namely `PartialOrd` and `Ord`), `k` is always 2, so we are
basically comparing `O(n)` versus `O(n^2)`.

Also, the stage is set for having *all* enum deriving codes go through
`build_enum_match_tuple` and getting rid of `build_enum_match`.

Also, seriously attempted to clean up the code itself.  Added a bunch
of comments attempting to document what I learned as I worked through
the original code and adapted it to this new strategy.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions