[ptx] patch to improve libpano12 performance on amd64 linux systems

Pablo d'Angelo pablo.dangelo at web.de
Mon Nov 7 07:50:00 GMT 2005


Hi all,

I have noticed that stitching 360x180 degs panos using hugin is very
slow on my linux (ubuntu breezy) AMD64 machine.

I have traced the problem to the tan() function standart math library
shipped with glibc 2.3.5. This function is terribly slow for tan(pi/2).

For this case it is roughly 40000 times slower than the i386 equivalent !!

Unfortunately tan(pi/2) is frequently computed in rect_sphere_tp. This
patch detects this case and uses a fixed big number for tan(pi/2).

Some linux distributions (suse, redhat) ship with a different, optimized
math library, but I haven't tested this one.

This patch should definately be used for all gcc compiled libpano12's on
amd64.

First tests (multiple tiff remapping with nona) indicate a the 64bit is
about 17% faster than the i386 version on the same machine and linux
installation.

ciao
  Pablo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libpano-amd64-tan-speedup.patch
Type: text/x-patch
Size: 544 bytes
Desc: not available
Url : https://www.email-lists.org/pipermail/ptx/attachments/20051107/299b3eaa/libpano-amd64-tan-speedup.bin


More information about the ptx mailing list