Skip to content

performance enhancements suggested by profiling #4

Description

@tflovorn

Profile with:

go test -c
go test -test.cpuprofile cpu.out
go tool pprof packageName.test cpu.out

in pprof:
top10, top40, etc. get most common functions
top40 -cum to sort by cumulative (+children) time
web to visualize


For tempFluc -testPlot, got:

31.7% of time spent in malloc through ZeroVector calls resulting from Vector.Add and Vector.Mul

14.3% of time spent in math.Tanh
12.9% of time spent in math.Sin

Sin calls are Sin(kx), Sin(ky); could cache these results. Vector Add/Mul allocation could be avoided by requiring result vector to already be allocated; most of the time it will be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions