Open
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