diff options
| author | gingerBill <bill@gingerbill.org> | 2025-02-20 14:10:45 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2025-02-20 14:10:45 +0000 |
| commit | 5489a889832ac05e5edca7355b4601c1a82c2d27 (patch) | |
| tree | d78b2b7852ff003d5f7c40c8a91c5332776f695c /src/llvm_backend_general.cpp | |
| parent | c25ac939d4bd86d51c383e96232da1d241c6a504 (diff) | |
Change `typeid` definition to be based around the canonical type hash
`typeid` used to be a fancy index with extra metadata stored on it. Now it is direct hash of the type.
This is safe to do in practice since any possible collisions are checked at compile time AND the chances of having a 1% collision are around 1 in 600K (see the Birthday Paradox).
Therefore accessing a `^Type_Info` is now a hash table lookup with linear probing. The table is twice the size than necessary so prevent too much probing due to an overly dense hash table.
Diffstat (limited to 'src/llvm_backend_general.cpp')
0 files changed, 0 insertions, 0 deletions