0 .. 50 (default = 0 for general physics engine)
This global variable (read/write) allows you to set the number of iterations per frame used to solve the physics system. If PH_ITERATIONS == 0 (default value) then the regular stable solver is used. If PH_ITETERATIONS > 0 then a linear iterative solver is used which is less stable but sometimes faster and uses less memory. For a typical constrained car PH_ITERATIONS==0 and PH_ITERATIONS==5 require about the same processing time, PH_ITERATIONS==10 would take slightly longer than PH_ITERATIONS==0 and PH_ITERATIONS==20 would take ca. 3 times as long. With two cars on the other hand PH_ITERATIONS==5 requires only 20%, PH_ITERATIONS==10 requires 40% and PH_ITERATIONS==20 requires 80% of PH_ITERATIONS==0. Entity masses should be scaled to be around 0..1 - forces will need to be adjusted accordingly.
To summarize: the more objects and constraints you have the more sense it makes to use higher PH_ITERATIONS values. However, you need to monitor your frame rate to make sure that you are indeed gaining and not losing performance.
More information: The regular solver is O(m*m) in size and O(m*m*m) in speed, with m=number of constraints (remember that a contact point is also a constraint). The iterative solver is O(1) in size and O(m*PH_ITERATIONS) in speed.
ph_iterations = 5;