{"id":19624203,"url":"https://github.com/rsheremeta/gob-proto-bench","last_synced_at":"2026-05-27T16:31:10.435Z","repository":{"id":175025098,"uuid":"650522550","full_name":"RSheremeta/gob-proto-bench","owner":"RSheremeta","description":"Benchmarking (de)serialization of Gob vs Protobuf","archived":false,"fork":false,"pushed_at":"2023-06-13T15:04:28.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T08:42:22.565Z","etag":null,"topics":["benchmark","benchmarking","go","gob","golang","proto","protobuf","protobuf3","protocol-buffers","serialization"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RSheremeta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-07T08:46:44.000Z","updated_at":"2024-01-03T14:17:25.000Z","dependencies_parsed_at":"2023-09-28T03:56:32.271Z","dependency_job_id":null,"html_url":"https://github.com/RSheremeta/gob-proto-bench","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"d0d46584219bda1308f5f7d1a46cdeda4eece19a"},"previous_names":["rsheremeta/gob-proto-bench"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RSheremeta/gob-proto-bench","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSheremeta%2Fgob-proto-bench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSheremeta%2Fgob-proto-bench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSheremeta%2Fgob-proto-bench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSheremeta%2Fgob-proto-bench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RSheremeta","download_url":"https://codeload.github.com/RSheremeta/gob-proto-bench/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSheremeta%2Fgob-proto-bench/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33575510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","benchmarking","go","gob","golang","proto","protobuf","protobuf3","protocol-buffers","serialization"],"created_at":"2024-11-11T11:37:16.293Z","updated_at":"2026-05-27T16:31:10.420Z","avatar_url":"https://github.com/RSheremeta.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gob-proto-bench\n\n#### Benchmarking Gob vs Protobuf.\nThis is Part 2 of the experiment of measuring Gob's (de)serialization performance. See Part 1 [here](https://github.com/RSheremeta/gob-serialization).\n\nThis repo is made just out of curiosity and has an experimental reasoning.\n\n### Description\nThere are 4 structs: `Tiny`, `Medium`, `Big`, `Huge` and a struct called `ComplexAndHuge` which holds `type complexMap map[string]*Huge`.\n\nEach of them has a respective size and complexity.\nAnd each of them builds the following targets to run encoding \u0026 decoding benchmarks against: \n- `Single` means a single struct - eg - `Tiny{}`\n- `Slice` means a slice of given struct - eg - `[]*Tiny`\n\n### Usage\nYou can just look at and analyze the results I got while running on my machine by observing csv samples in **results_run/sample/** dir.\n\nAlso, feel free to play on your own by doing the following:\n\nRun a corresponding **Make** command in terminal and observe the results in **results_run/** dir.\nOtherwise run `make run-all` in order to run everything. Warning: beware as it's a very CPU/RAM consuming operation.\n\n### Results\n**Software and Hardware:**\nThe experiment is run on:\n- MacBook Pro 2021 16\" with macOS Ventura 13.2.1 \n- 32gb RAM\n- Apple M1 Pro CPU\n- Go 1.20.3\n\nHere is the full analysis of mine about all the results run: [Analysis.md](https://github.com/RSheremeta/gob-proto-bench/blob/master/Analysis.md)\n\n[**map_slice_decode.csv:**](https://github.com/RSheremeta/gob-proto-bench/blob/master/results_run/sample/map_slice_decode.csv)\n\n```bash\ngoos: darwin\ngoarch: arm64\npkg: github.com/RSheremeta/gob-proto-bench/test\nBenchmarkDecodeSliceComplexMap/type=GOB_struct_size=huge_complex_map_slice-10         \t      10\t 573950896 ns/op\t633277254 B/op\t10645891 allocs/op\nBenchmarkDecodeSliceComplexMap/type=Proto_struct_size=huge_complex_map_slice-10       \t      10\t2153558850 ns/op\t2337695762 B/op\t46637425 allocs/op\nPASS\nok  \tgithub.com/RSheremeta/gob-proto-bench/test\t35.524s\n```\n\n[**all.csv:**](https://github.com/RSheremeta/gob-proto-bench/blob/master/results_run/sample/all.csv)\n\n```bash\ngoos: darwin\ngoarch: arm64\npkg: github.com/RSheremeta/gob-proto-bench/test\nBenchmarkEncodeSingleComplexMap/type=GOB_struct_size=huge_complex_map-10         \t      10\t  51486367 ns/op\t84000476 B/op\t  731909 allocs/op\nBenchmarkEncodeSingleComplexMap/type=Proto_struct_size=huge_complex_map-10       \t      10\t  42282621 ns/op\t43574969 B/op\t  466007 allocs/op\nBenchmarkDecodeSingleComplexMap/type=GOB_struct_size=huge_complex_map-10         \t      10\t  55438804 ns/op\t36013430 B/op\t 1064916 allocs/op\nBenchmarkDecodeSingleComplexMap/type=Proto_struct_size=huge_complex_map-10       \t      10\t  43338646 ns/op\t46754095 B/op\t  932749 allocs/op\nBenchmarkEncodeSliceComplexMap/type=GOB_struct_size=huge_complex_map_slice-10    \t      10\t 478913167 ns/op\t809327492 B/op\t 7318093 allocs/op\nBenchmarkEncodeSliceComplexMap/type=Proto_struct_size=huge_complex_map_slice-10  \t      10\t2021125029 ns/op\t2181639455 B/op\t23299823 allocs/op\nBenchmarkDecodeSliceComplexMap/type=GOB_struct_size=huge_complex_map_slice-10    \t      10\t 565821717 ns/op\t633277498 B/op\t10645893 allocs/op\nBenchmarkDecodeSliceComplexMap/type=Proto_struct_size=huge_complex_map_slice-10  \t      10\t2124560267 ns/op\t2337694348 B/op\t46637417 allocs/op\nBenchmarkEncodeSingle/type=GOB_struct_size=tiny-10                               \t      10\t      2708 ns/op\t    1136 B/op\t      20 allocs/op\nBenchmarkEncodeSingle/type=GOB_struct_size=medium-10                             \t      10\t      4771 ns/op\t    1720 B/op\t      38 allocs/op\nBenchmarkEncodeSingle/type=GOB_struct_size=big-10                                \t      10\t      6317 ns/op\t    2792 B/op\t      61 allocs/op\nBenchmarkEncodeSingle/type=GOB_struct_size=huge-10                               \t      10\t    740108 ns/op\t 1184470 B/op\t    5407 allocs/op\nBenchmarkEncodeSingle/type=Proto_struct_size=tiny-10                             \t      10\t       950.0 ns/op\t      16 B/op\t       1 allocs/op\nBenchmarkEncodeSingle/type=Proto_struct_size=medium-10                           \t      10\t      1017 ns/op\t      48 B/op\t       1 allocs/op\nBenchmarkEncodeSingle/type=Proto_struct_size=big-10                              \t      10\t      1258 ns/op\t     128 B/op\t       1 allocs/op\nBenchmarkEncodeSingle/type=Proto_struct_size=huge-10                             \t      10\t    464279 ns/op\t  172032 B/op\t       1 allocs/op\nBenchmarkDecodeSingle/type=GOB_struct_size=tiny-10                               \t      10\t     11879 ns/op\t    6776 B/op\t     180 allocs/op\nBenchmarkDecodeSingle/type=GOB_struct_size=medium-10                             \t      10\t     15504 ns/op\t    8728 B/op\t     237 allocs/op\nBenchmarkDecodeSingle/type=GOB_struct_size=big-10                                \t      10\t     18975 ns/op\t   11379 B/op\t     317 allocs/op\nBenchmarkDecodeSingle/type=GOB_struct_size=huge-10                               \t      10\t   1167321 ns/op\t  732968 B/op\t   21628 allocs/op\nBenchmarkDecodeSingle/type=Proto_struct_size=tiny-10                             \t      10\t       204.2 ns/op\t      72 B/op\t       2 allocs/op\nBenchmarkDecodeSingle/type=Proto_struct_size=medium-10                           \t      10\t       675.0 ns/op\t     256 B/op\t       6 allocs/op\nBenchmarkDecodeSingle/type=Proto_struct_size=big-10                              \t      10\t       925.0 ns/op\t     680 B/op\t      14 allocs/op\nBenchmarkDecodeSingle/type=Proto_struct_size=huge-10                             \t      10\t    906150 ns/op\t  934972 B/op\t   18652 allocs/op\nBenchmarkEncodeSlice/type=GOB_struct_size=tiny-10                                \t      10\t      4858 ns/op\t    1664 B/op\t      25 allocs/op\nBenchmarkEncodeSlice/type=GOB_struct_size=medium-10                              \t      10\t      7342 ns/op\t    4504 B/op\t      54 allocs/op\nBenchmarkEncodeSlice/type=GOB_struct_size=big-10                                 \t      10\t     34996 ns/op\t   48297 B/op\t     272 allocs/op\nBenchmarkEncodeSlice/type=GOB_struct_size=huge-10                                \t      10\t  34902979 ns/op\t65902422 B/op\t  266108 allocs/op\nBenchmarkEncodeSlice/type=Proto_struct_size=tiny-10                              \t      10\t      1329 ns/op\t      80 B/op\t       1 allocs/op\nBenchmarkEncodeSlice/type=Proto_struct_size=medium-10                            \t      10\t      2862 ns/op\t     512 B/op\t       1 allocs/op\nBenchmarkEncodeSlice/type=Proto_struct_size=big-10                               \t      10\t     19642 ns/op\t    6528 B/op\t       1 allocs/op\nBenchmarkEncodeSlice/type=Proto_struct_size=huge-10                              \t      10\t  22906321 ns/op\t 8314889 B/op\t       1 allocs/op\nBenchmarkDecodeSlice/type=GOB_struct_size=tiny-10                                \t      10\t     12954 ns/op\t    8035 B/op\t     219 allocs/op\nBenchmarkDecodeSlice/type=GOB_struct_size=medium-10                              \t      10\t     19488 ns/op\t   11513 B/op\t     322 allocs/op\nBenchmarkDecodeSlice/type=GOB_struct_size=big-10                                 \t      10\t     66958 ns/op\t   40086 B/op\t    1133 allocs/op\nBenchmarkDecodeSlice/type=GOB_struct_size=huge-10                                \t      10\t  54951358 ns/op\t36011614 B/op\t 1064871 allocs/op\nBenchmarkDecodeSlice/type=Proto_struct_size=tiny-10                              \t      10\t      1104 ns/op\t     544 B/op\t      15 allocs/op\nBenchmarkDecodeSlice/type=Proto_struct_size=medium-10                            \t      10\t      3179 ns/op\t    2872 B/op\t      66 allocs/op\nBenchmarkDecodeSlice/type=Proto_struct_size=big-10                               \t      10\t     34592 ns/op\t   35080 B/op\t     708 allocs/op\nBenchmarkDecodeSlice/type=Proto_struct_size=huge-10                              \t      10\t  43635229 ns/op\t46749566 B/op\t  932608 allocs/op\nPASS\nok  \tgithub.com/RSheremeta/gob-proto-bench/test\t67.650s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsheremeta%2Fgob-proto-bench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsheremeta%2Fgob-proto-bench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsheremeta%2Fgob-proto-bench/lists"}