9a1b30652dd78d3549dba1d58e795345596d3a8e | Author: Adrien Bustany <adrien@bustany.org>
| 2015-08-25 15:59:14+02:00
query: Improve efficiency of 'USE' statement detection
Benchmark results for a 80 character statement that does not start with
'use':
Before: 1927 ns/op 192 B/op 2 allocs/op
After: 142 ns/op 6 B/op 2 allocs/op
5a689b9e500255db63ec23c5be1aa089cdcd6e88 | Author: Adrien Bustany <adrien@bustany.org>
| 2015-08-25 14:57:55+02:00
Use an LRU cache with "pure" string keys
Using an LRU cache with interface{} keys means that each lookup is
significantly more expensive than a simple string hash: the string value
first has to be wrapped into an interface{}, causing a memory
allocation, and the map then needs to figure out what's the proper way
to hash that value.
fea9edbc923ec012712f50dcbb4840acaaec9acc | Author: Adrien Bustany <adrien@bustany.org>
| 2015-08-24 22:10:58+02:00
query: Avoid binary.Write in GetRoutingKey
That last one introspects the type dynamically, which is around 100x
slower than using the PutUint16 function directly.