|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Sun Jul 27, 2008 1:21 am
#call vs #noop with functions |
A fair bit of my scripting uses #noop instead of #call for functions.
I was wondering whether this matters? I wrote it that way originally, not knowing about #call. If its bad, I'll just have to go through and change it, but if it doesn't matter then I won't bother. |
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sun Jul 27, 2008 4:03 am |
It does matter (as I discovered for myself), you'll need to go through and change it.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Jul 27, 2008 3:35 pm |
The difference as far as I know is that #NOOP examines its parameters at runtime, whereas #CALL is examined at compile time. This lets #CALL go a bit faster. COM references also have special threading requirements, and because of this #NOOP is always run in that special mode, whereas #CALL is evaluated to determine if that mode is required. Once again it makes #CALL a small bit faster.
Basically anyplace you have #NOOP should be #CALL. I don't actually know of script that requires #NOOP instead. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Wed Jul 30, 2008 2:17 pm |
#NOOP no longer works for function calls AFAIK, or at least on some function calls. #NOOP used to be more efficient in zMUD (or at least appeared to be from the description).
|
|
|
|
|
|