[PPL-devel] Question regarding speed of the library
Martin Rohde
M.Rohde at klft.tn.tudelft.nl
Thu Aug 29 14:16:58 CEST 2002
Hello,
I have a question regarding the speed of the PPL0.4.1 library.
I'm using the library now for calculating the intersection of two convex
polyhedra. During my calculations, a large number of intersections must
be calculated (say 50000 times). The library does its calculations very
well, but it costs a lot of time to calculate an intersection. In my
code I do the following:
1. Add generators to a polyhedron 1
2. Add generators to a polyhedron 2
3. Calculate the intersection of polyhedra 1 and 2
4. Store the constraints and the generators in an array (I convert all
coefficients to doubles)
This process costs 100 seconds for 30000 calculations (so 30
intersections per second) on a 600MHz machine.
When I remove step 3 (so I skip the intersection), the calculation takes
about the same amount of time. So, the intersection is not the time
consuming step. But removing step 1 and/or 2 speeds up the calculation
significantly! So I might conclude that the ph.add_generator(ax+by+cz)
is very slow.
My questions are now:
- is add_generator slow indeed?
- How can I speed up the code?
Thank you for your help!
Martin Rohde
More information about the PPL-devel
mailing list