[Python.NET] Re: Python to c# long conversion time

[email protected] Wed, 29 Jun 2022 06:46:09 -0000
Newsgroups gmane.comp.python.dotnet
Message-ID <[email protected]>
Thanks for your answer.

In my .Net example:
                ...
                long t0 = st.ElapsedMilliseconds;
                PyBuffer myarr = myPyByteArray.GetBuffer();
                byte[] myCsharpByteArray = new byte[(int)myarr.Length];
                myarr.Read(myCsharpByteArray, 0, (int)myarr.Length, 0);
                long t1 = st.ElapsedMilliseconds;
                ...

Now the conversion takes less than 10 ms.

Thanks,
Jordan
_______________________________________________
PythonNet mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/pythonnet.python.org/
Member address: [email protected]