Bryan Boreham
27cf8f3b06
Fix format string to work for all types
2018-04-05 08:18:52 +00:00
Bryan Boreham
f17640646e
Blank out value on LatestMap decode insert
...
Fixing a rare case that came up in a test. In order for this to cause
a problem, the data being decoded has to have entries out of order,
and have a value that is nil or omitted.
2018-02-26 10:34:53 +00:00
Matthias Radestock
e24d3e93fe
Add static map of common keys to reduce allocations
2017-12-11 20:26:47 +00:00
Bryan Boreham
d1bf98dfde
Remove struct wrapping LatestMap
...
It isn't necessary, and it prevents the codec from seeing maps as empty
2017-12-06 15:46:31 +00:00
Matthias Radestock
4162b5d734
allocate less memory in LatestMap merging
...
Most maps we merge have the same keys, or at least one set of keys is
the subset of the other. Therefore, allocate a result slice capable of
holding only the max of number keys, rather than the sum.
2017-12-02 13:13:08 +00:00
Bryan Boreham
5acece6e58
Refactor: loop replaced with append()
2017-10-11 09:50:06 +00:00
Bryan Boreham
29f139d424
Re-implement LatestMap as a sorted slice for better performance
...
both the Python generator and the Go generated code are checked in
2017-10-01 16:18:59 +00:00
Matthias Radestock
4dbb913ca2
refactor: remove dead Copy() code
2017-07-04 07:35:30 +01:00
Matthias Radestock
430e74a80a
refactor: remove report latest map Delete()
...
It wasn't used, and is problematic in any case since it introduces
non-monotonicity.
2017-07-03 02:06:21 +01:00
Matthias Radestock
9dc50b5202
refactor: hide "empty set" constants
...
They are an implementation detail.
2017-07-03 01:26:22 +01:00
Bryan Boreham
36ff5ab71a
Write psMap out directly
...
rather than going via intermediate data structure
2017-04-25 10:38:56 +00:00
Bryan Boreham
b3f53a7a81
Call CodecDecodeSelf() instead of Decode()
...
This avoids a runtime type lookup, so goes a little faster.
Also having less recursion makes it easier to interpret profiles.
2017-03-23 12:25:12 +00:00
Bryan Boreham
de97a72661
Remove indirection via LatestMap
...
Structs like StringLatestMap now use ps.Map directly, which saves
a memory allocation for LatestEntry.Value to point to.
The values in the ps.Map are now pointers, which saves a memory
allocation indirecting a value type to an interface{}
2017-03-20 11:51:04 +00:00
Iago López Galeiras
5cb5c7d42e
Fix shfmt issues
2017-01-18 11:51:41 +01:00
Iago López Galeiras
643827d9a7
Re-add generate_latest_map script
...
It was removed from the build-tools repository. Add it to extra/ and fix
a couple of linter errors.
2017-01-09 16:40:16 +01:00