Commit Graph

5 Commits

Author SHA1 Message Date
Jonathan Bluett-Duncan
bdcda9a453 graph: use slices package for sorting and reversing slices 2024-08-17 08:41:18 +09:30
Dan Kortschak
a2c6f817bf ci: replace golangci-lint with staticcheck 2022-05-18 21:35:57 +09:30
Dan Kortschak
0164be019d graph/formats/rdf: use isBlank and isIRI helpers 2021-06-12 21:18:28 +09:30
Dan Kortschak
a6eddb68ae graph/formats/rdf: work on optimising performance of IsoCanonicalize
name                                             old time/op    new time/op    delta
IsoCanonicalHashes/test019-in.nq/decomp=false-8    27.6µs ± 6%    26.4µs ± 5%  -4.08%  (p=0.000 n=46+48)
IsoCanonicalHashes/test019-in.nq/decomp=true-8     29.9µs ± 5%    29.6µs ± 3%  -1.12%  (p=0.000 n=45+49)
IsoCanonicalHashes/test044-in.nq/decomp=false-8     449ms ± 3%     432ms ± 1%  -3.84%  (p=0.000 n=45+47)
IsoCanonicalHashes/test044-in.nq/decomp=true-8      462ms ± 1%     452ms ± 4%  -2.13%  (p=0.000 n=44+43)

name                                             old alloc/op   new alloc/op   delta
IsoCanonicalHashes/test019-in.nq/decomp=false-8    16.1kB ± 0%    16.5kB ± 0%  +2.39%  (p=0.000 n=50+50)
IsoCanonicalHashes/test019-in.nq/decomp=true-8     18.9kB ± 0%    19.5kB ± 0%  +2.79%  (p=0.000 n=50+50)
IsoCanonicalHashes/test044-in.nq/decomp=false-8    85.4MB ± 0%    82.1MB ± 0%  -3.93%  (p=0.000 n=49+50)
IsoCanonicalHashes/test044-in.nq/decomp=true-8     84.7MB ± 0%    81.3MB ± 0%  -3.97%  (p=0.000 n=48+50)

name                                             old allocs/op  new allocs/op  delta
IsoCanonicalHashes/test019-in.nq/decomp=false-8       207 ± 0%       215 ± 0%  +3.86%  (p=0.000 n=50+50)
IsoCanonicalHashes/test019-in.nq/decomp=true-8        238 ± 0%       249 ± 0%  +4.62%  (p=0.000 n=50+50)
IsoCanonicalHashes/test044-in.nq/decomp=false-8     1.53M ± 0%     1.51M ± 0%  -1.03%  (p=0.000 n=49+50)
IsoCanonicalHashes/test044-in.nq/decomp=true-8      1.52M ± 0%     1.51M ± 0%  -1.04%  (p=0.000 n=49+50)
2021-05-05 14:52:27 +09:30
Dan Kortschak
782095d131 graph/formats/rdf: implement canonicalisation hashing
Test cases test001-in.nq to test062-in.nq are from [1] licensed under the
W3C BSD 3-clause license. Test cases hogan*.nq are from the original paper
used with permission.

[1]https://json-ld.github.io/normalization/tests/index.html
2021-05-05 14:52:27 +09:30