View Single Post
  #279  
Old 05-19-2011, 09:44 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by Stefan View Post
- 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(10102020) * 2;
}

inline function distance(temp.x1temp.y1temp.x2temp.y2) {
  return ((
temp.x2 temp.x1)^+ (temp.y2 temp.y1)^2)^0.5;

would be transformed to

PHP Code:
function foobar() {
  return (((
20 10)^+ (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.
Reply With Quote