Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sbinet opened this issue Mar 14, 2016 · 0 comments
Open

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

sbinet opened this issue Mar 14, 2016 · 0 comments
Labels

Comments

@sbinet
Copy link
Owner

sbinet commented Mar 14, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant