labs12

package
v0.0.0-...-6c2044b Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

测试jemalloc和malloc在go程序中是否有性能差别。

实验结果:

dada-imac:labs dada$ go test -test.bench=".*" labs12
PASS
Benchmark_AllocAndFree	10000000	       190 ns/op
Benchmark_JeAllocAndFree	20000000	       135 ns/op
ok  	labs12	4.971s

实验结论:还是有差的

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocAndFree

func AllocAndFree()

func JeAllocAndFree

func JeAllocAndFree()

Types

type BigStruct

type BigStruct struct {
	C01 int
	C02 int
	C03 int
	C04 int
	C05 int
	C06 int
	C07 int
	C08 int
	C09 int
	C10 int
	C11 int
	C12 int
	C13 int
	C14 int
	C15 int
	C16 int
	C17 int
	C18 int
	C19 int
	C20 int
	C21 int
	C22 int
	C23 int
	C24 int
	C25 int
	C26 int
	C27 int
	C28 int
	C29 int
	C30 int
	// contains filtered or unexported fields
}

func NewBigStruct

func NewBigStruct() *BigStruct

type XStruct

type XStruct struct {
	// contains filtered or unexported fields
}

func NewXStruct

func NewXStruct() *XStruct

Jump to

Keyboard shortcuts

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