As my last contribution to this thread today, I just did what could have
answered my question about extends in the first place. I did some timing on
using the simple extend that replaces i=i+1 with i.Incr.
It turns out that using i.Incr takes just over three times as long to
execute as i=i+1 (on Windows).
This is of course only of importance when used in a loop that calls the
function millions of times. And even then is the time needed to execute so
incredibly short that difference in execution time basically still means
nothing.
So, RS doesn't have to add any functions that can be performed with extends,
as the time needed to implement them into RB will likely never pay off
speedwise. Because of this I'd have to agree with Craig. These things aren't
important enough in light of other issues that need resolving.
Ronald Vogelaar
http://www.rovosoft.com
----- Original Message -----
From: "Ronald Vogelaar" <[EMAIL PROTECTED]>
To: "REALbasic NUG" <[email protected]>
Sent: Thursday, October 12, 2006 9:55 PM
Subject: Re: Language addition proposals
Thanks Daniel, that clarifies things a bit. It's how I thought it might
work, but I wasn't sure it actually did. After all, a compiler might
optimise and unroll such extends into longhand anyway, but I take it the
RB compiler doesn't (can't) assume you'd want that to happen?
Ronald Vogelaar
http://www.rovosoft.com
----- Original Message -----
From: "Daniel Stenning" <[EMAIL PROTECTED]>
I am definitely NOT a C proponent btw :)
Concering extends - it will depend on whether you are using the extends
in a
very large loop or just once. Every method or function call requires
stack
operations which take a number of processor cycles. The more arguments on
the function the more has to be "pushed" on to the stack and then
"popped"
off. Every app ever written is using the stack all the time ( every time
a
function or method is called ) but if one is using an extension function
to
replace a line of code it could be quite expensive compared to just
writing
out the same line of code "longhand".
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
__________ NOD32 1.1800 (20061012) Information __________
This message was checked by NOD32 antivirus system.
http://www.eset.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>