Quote:
Originally Posted by Stefan
- scripting is 20-50 % faster (fast delivery of events, optimized statements etc.)
|
Is it possible to get an inline pragma for functions?
Example:
PHP Code:
function foobar() {
return this.distance(10, 10, 20, 20) * 2;
}
inline function distance(temp.x1, temp.y1, temp.x2, temp.y2) {
return ((temp.x2 - temp.x1)^2 + (temp.y2 - temp.y1)^2)^0.5;
}
would be transformed to
PHP Code:
function foobar() {
return (((20 - 10)^2 + (20 - 10)^2)^0.5) * 2;
}
at compile time.
Obviously don't really care about syntax, whatever works better is fine.
Function calls really do cause some bad overhead issues in certain places and being able to inline things would be really useful.