go-python / gopy

gopy generates a CPython extension module from a go package.
BSD 3-Clause "New" or "Revised" License
2.05k stars 113 forks source link

Efficient copies of bytes #342

Closed NoamK-CR closed 7 months ago

NoamK-CR commented 1 year ago

This aims to solve both #323 and #328 by supplying efficient methods to copy Python bytes into Go []byte slices and vice versa.

One question I have is whether the Slice_byte Python constructor should check if the first argument is of type bytes, and if so use the optimized method?

rcoreilly commented 11 months ago

this looks interesting -- but will take more time than I have avail right now. also can you fix the build after I update with other PRs?

NoamK-CR commented 11 months ago

Sure, I'll fix the build now and rebase.

rcoreilly commented 7 months ago

Thanks and sorry for the delay in merging!