- 24 Aug, 2021 2 commits
-
-
tavit ohanian authored
-
tavit ohanian authored
-
- 13 Jul, 2021 1 commit
-
-
Whyrusleeping authored
feat: take cbor adapters by-value when encoding
-
- 13 May, 2021 1 commit
-
-
Steven Allen authored
This just makes our lives easier when using them. We can now, e.g., pass `CborInt(1)` to something that expects a `CBORMarshaler`.
-
- 22 Apr, 2021 1 commit
-
-
Steven Allen authored
fix: import "math" in generated code for uint8 unmarshalling
-
- 01 Apr, 2021 1 commit
-
-
Nex Zhu authored
-
- 03 Mar, 2021 2 commits
-
-
Steven Allen authored
doc: document Write*EncodersToFile functions
-
Steven Allen authored
fixes #51
-
- 19 Feb, 2021 1 commit
-
-
Łukasz Magiera authored
feat: allow unmarshaling of struct with more fields than marshaled struct
-
- 17 Feb, 2021 1 commit
-
-
Dirk McCormick authored
-
- 16 Feb, 2021 1 commit
-
-
Dirk McCormick authored
-
- 18 Jan, 2021 2 commits
-
-
Steven Allen authored
chore: add a license file
-
Steven Allen authored
fixes #47
-
- 26 Aug, 2020 3 commits
-
-
Whyrusleeping authored
fix: enforce maxlen in ReadByteArray()
-
Lucas Molas authored
-
Lucas Molas authored
-
- 14 Aug, 2020 7 commits
-
-
Whyrusleeping authored
use unix nanoseconds for encoding Cbortime
-
whyrusleeping authored
-
whyrusleeping authored
-
Whyrusleeping authored
add a helper for roundtripping time.time objects
-
whyrusleeping authored
-
Whyrusleeping authored
Add a validate function.
-
Steven Allen authored
This function is equivalent to Deferred.UnmarshalCBOR, just more efficient because it doesn't copy.
-
- 12 Aug, 2020 2 commits
-
-
Whyrusleeping authored
Fix import handling
-
Steven Allen authored
Unfortunately, while goimports works in many cases, it won't always work. This change handles imports internally.
-
- 11 Aug, 2020 4 commits
-
-
Whyrusleeping authored
Optimize discarding in ScanForLinks
-
Whyrusleeping authored
Always allocate scratch space when marshalling into a map.
-
Steven Allen authored
We use it for writing the keys.
-
Steven Allen authored
This gives a pretty significant speedup and drops us down to an allocation per link. name old time/op new time/op delta LinkScan-4 4.03µs ± 3% 1.26µs ±12% -68.79% (p=0.000 n=10+10) name old alloc/op new alloc/op delta LinkScan-4 881B ± 0% 112B ± 0% -87.29% (p=0.002 n=8+10) name old allocs/op new allocs/op delta LinkScan-4 25.0 ± 0% 1.0 ± 0% -96.00% (p=0.000 n=10+10)
-
- 10 Aug, 2020 1 commit
-
-
Whyrusleeping authored
optimize byte reading
-
- 07 Aug, 2020 1 commit
-
-
Steven Allen authored
When using cbor-gen, we _usually_ work with byte buffers/readers. Calling `ReadByte` on a byte.Reader/byte.Buffer is much faster than calling `Read` and copying into a slice. name old time/op new time/op delta Marshaling-4 911ns ± 2% 904ns ± 5% ~ (p=0.646 n=9+10) Unmarshaling-4 4.46µs ± 1% 3.94µs ± 2% -11.55% (p=0.000 n=10+8) LinkScan-4 4.65µs ± 2% 4.01µs ± 2% -13.76% (p=0.000 n=9+10) Deferred-4 3.68µs ± 3% 3.02µs ± 4% -17.91% (p=0.000 n=10+10) name old alloc/op new alloc/op delta Marshaling-4 160B ± 0% 160B ± 0% ~ (all equal) Unmarshaling-4 3.46kB ± 0% 3.46kB ± 0% ~ (all equal) LinkScan-4 880B ± 0% 880B ± 0% ~ (p=0.650 n=10+10) Deferred-4 96.0B ± 0% 96.0B ± 0% ~ (all equal) name old allocs/op new allocs/op delta Marshaling-4 10.0 ± 0% 10.0 ± 0% ~ (all equal) Unmarshaling-4 43.0 ± 0% 43.0 ± 0% ~ (all equal) LinkScan-4 25.0 ± 0% 25.0 ± 0% ~ (all equal) Deferred-4 3.00 ± 0% 3.00 ± 0% ~ (all equal)
-
- 06 Aug, 2020 2 commits
-
-
Whyrusleeping authored
Optimize decoding
-
Steven Allen authored
-
- 05 Aug, 2020 4 commits
-
-
Steven Allen authored
This way, we can't blow out our stack.
-
Steven Allen authored
We use this quite frequently so it should be fast. Note: this removes the depth restriction because the algorithm is no longer recursive.
-
Steven Allen authored
Type asserting to a concrete type is ~10x faster than type asserting to an interface. This change has a significant performance impact in my test. readByte used to account for 10.8% of the time, now it accounts for 3.4%.
-
Steven Allen authored
Buffering could lead to reading over the end of the object, corrupting the next object. This patch also gets rid of "PeekByte" and uses the standard ReadByte/UnreadByte interfaces. That way, we can avoid wrapping the byte reader in the happy path, saving some overhead.
-
- 23 Jul, 2020 3 commits
-
-
Jakub Sztandera authored
Fix named string issue
-
Jakub Sztandera authored
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
-
Jakub Sztandera authored
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
-