other notes on optimized maps in the runtime

This commit is contained in:
Damian Gryski 2018-03-03 14:41:19 -08:00
parent 0b28a0d8fd
commit 3f45c91bb0

View File

@ -743,6 +743,9 @@ allocate it. But you also pay every time the garbage collection runs.
* type assertions vs. type switches
* defer
* special-case map implementations for ints, strings
* map for byte/uint16 not optimized; use a slice instead.
* You can fake a float64-optimized with math.Float{32,64}{from,}bits, but beware float equality issues
* https://github.com/dgryski/go-gk/blob/master/exact.go says 100x faster; need benchmarks
* bounds check elimination
* []byte <-> string copies, map optimizations
* two-value range will copy an array, use the slice instead: