Speeding up Python

Tyler Fox <[email protected]> Mon, 1 Apr 2019 12:39:04 -0700
Newsgroups gmane.comp.video.openexr.devel
Message-ID <CAH2Os1=vztL_DkhZmCx+cBwTS02z5Ay4HGbt3fe4Ga3xOaFS5w@mail.gmail.com>
--===============6408816294683001362==
Content-Type: multipart/alternative; boundary="000000000000f52c2505857d2cca"

--000000000000f52c2505857d2cca
Content-Type: text/plain; charset="UTF-8"

Getting data in and out of imath in python is *SLOW*. And yes, Python is a
slow language, but that doesn't mean we can't kick it up a notch.
Could I get some feedback on my proposals to speed things up?

https://github.com/openexr/openexr/pull/373
First is a PR with a *very* simple change that just exposes the memory
address of the imath object.
With a few lines of python code, you can read the c-data and re-interpret
it in whatever way you want.

https://github.com/openexr/openexr/issues/367
This is an issue where I described a more complex (and maybe more
pythonic?) way of exposing the underlying data.

Either of these proposals could remove the need for imathnumpy... Or
imathnumpy could be replaced with a pure-python module that handles the
more error prone memory mapping.

Thoughts?
~T.Fox

--000000000000f52c2505857d2cca
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Getting data in and out of imath in python is *SLOW*.=
 And yes, Python is a slow language, but that doesn&#39;t mean we can&#39;t=
 kick it up a notch.</div><div>Could I get some feedback on my proposals to=
 speed things up?</div><div><br></div><a href=3D"https://github.com/openexr=
/openexr/pull/373">https://github.com/openexr/openexr/pull/373</a><div>Firs=
t is a PR with a *very* simple change that just exposes the memory address =
of the imath object.</div><div>With a few lines of python code, you can rea=
d the c-data and re-interpret it in whatever way you want.</div><div><br></=
div><div><div><div><a href=3D"https://github.com/openexr/openexr/issues/367=
">https://github.com/openexr/openexr/issues/367</a>=C2=A0<br></div></div></=
div><div>This is an issue where I described a more complex (and maybe more =
pythonic?) way of exposing the underlying data.</div><div><br></div><div>Ei=
ther of these proposals could remove the need for imathnumpy... Or imathnum=
py could be replaced with a pure-python module that handles the more error =
prone memory mapping.</div><div><br></div><div>Thoughts?</div><div>~T.Fox</=
div></div>

--000000000000f52c2505857d2cca--


--===============6408816294683001362==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Openexr-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/openexr-devel

--===============6408816294683001362==--