map_vs_context

package
v2.0.0-rc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 4 Imported by: 0

README

Result

Storing transaction in context is faster than map storing. However, when using the real database (sqlite), the result is similar.

BenchmarkContextEmptyTransaction-12    	11344580	       100.8 ns/op
BenchmarkMapEmptyTransaction-12        	 1448832	       837.7 ns/op
BenchmarkContextCopy-12                	  622712	      1769 ns/op
BenchmarkMapCopy-12                    	  645990	      2562 ns/op
BenchmarkContextRealTransaction-12     	   12331	     98315 ns/op
BenchmarkMapRealTransaction-12         	   10000	    105360 ns/op

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL