a few quick thoughts

This commit is contained in:
Damian Gryski 2018-01-04 22:18:15 -08:00
parent cf2414f5c6
commit 3f14524242
2 changed files with 4 additions and 0 deletions

2
TODO
View File

@ -128,6 +128,8 @@ posts:
https://hackernoon.com/optimizing-optimizing-some-insights-that-led-to-a-400-speedup-of-powerdns-5e1a44b58f1c
http://leto.net/docs/C-optimization.php
http://www.stochasticlifestyle.com/algorithm-efficiency-comes-problem-information/
tools:
https://godoc.org/github.com/aclements/go-perf
https://godoc.org/x/perf/cmd/benchstat

View File

@ -165,6 +165,7 @@ Augment your data structure with more information:
- limitations of when this is applicable:
must be cheap to keep updated
- all these fall under "do less work" (at the data structure level)
- bloom filter (for example)
Trade space for time:
- smaller data structures: pack things, compress data structures in memory
@ -311,6 +312,7 @@ Techniques applicable to source code in general
* What causes heap allocations?
* Understanding escape analysis
* API design to limit allocations: allow passing in buffers so caller can reuse rather than forcing an allocation
- you can even modify a slice in place carefully while you scan over it
* reducing pointers to reduce gc scan times
## Runtime