Skip to content

performance sweet spot: balance between memory usage / CPU usage #6

Open
@sbinet

Description

binary.Write creates a []byte slice corresponding to the whole input data (ie: for a []float64 slice, a make([]byte, len(slice)*8) is created and then filled).
this translates into better CPU performances (presumably because less calls to w.Write(buf[:])) but, of course, into a greater memory usage (and allocations).

not sure what npyio should do in this case (currently, it works element-wise, so just the memory to hold an element is used)
the CPU performances are not that bad.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions