Skip to content

testing and taking benchmark of go-radix exported as gob file format.

Notifications You must be signed in to change notification settings

suzuken/go-radix-gob-bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-radix benchmark

This repository created for testing armon/go-radix tree serialization in gob.

benchmark

testing on MBP 2015 early, Mavericks.

$ go test -v -run=^$ -bench=. -benchtime=10s
PASS
BenchmarkBuildTree10000-8               20000000               746 ns/op            4160 B/op           3 allocs/op
BenchmarkBuildTree100000-8              10000000              1289 ns/op            4163 B/op           3 allocs/op
BenchmarkBuildTree1000000-8             10000000             1060 ns/op            4198 B/op           4 allocs/op
BenchmarkBuildTreeFromGob10000-8        20000000               635 ns/op             296 B/op           6 allocs/op
BenchmarkBuildTreeFromGob100000-8       20000000               692 ns/op             302 B/op           6 allocs/op
BenchmarkBuildTreeFromGob1000000-8       3000000              3825 ns/op             771 B/op          16 allocs/op
ok      github.com/suzuken/go-radix-gob 305.006s

consideration

  • Encoding into gob is not allowed for a struct which does not have public fields.
    • Therefore, in this benchmark, I use gob via map[string]interface{} which is generated by radix.Tree.ToMap().
  • radix.NewFromMap iterate over map[string]interface{} and insert into node.
    • so, it's not reason to avoid insertion offline.
  • That is to say insertion node or edge into tree cause overhead.
  • For offline indexing: Is it effective that dump whole radix.Tree object?

LICENSE

MIT

Author

Kenta Suzuki

About

testing and taking benchmark of go-radix exported as gob file format.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published