Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-19-2007, 03:59 AM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Quote:
Originally Posted by Googi View Post
If you really want to know, test both methods by using a timeout. Have a script start a timeout, do some stuff (probably quite a bit of stuff) using the first method, and then save the value of the timeout to a variable/echo it/whatever. Then do the same with the second method (of course, make sure that the stuff done with the second method is the same as for the first).
Directly accessing the value is systematically faster than accessing the value and comparing a bunch of values inside. ( It could be slower on loading up, but once loaded, it is fairly fast ).
Reply With Quote
  #2  
Old 10-19-2007, 05:17 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Quote:
Originally Posted by Novo View Post
Directly accessing the value is systematically faster than accessing the value and comparing a bunch of values inside. ( It could be slower on loading up, but once loaded, it is fairly fast ).
But you could find out how much faster.
__________________
Reply With Quote
  #3  
Old 10-19-2007, 06:51 AM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Quote:
Originally Posted by Googi View Post
But you could find out how much faster.
N times faster. N being the size of the array.
Reply With Quote
  #4  
Old 10-19-2007, 07:03 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Quote:
Originally Posted by Novo View Post
N times faster. N being the size of the array.
If you don't count the time it takes to open and read the file, sure.
__________________
Reply With Quote
  #5  
Old 10-19-2007, 07:32 AM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Quote:
Originally Posted by Googi View Post
If you don't count the time it takes to open and read the file, sure.
Which is what caching does. You read it from file, you cache it to memory. The load-up times would differ. Taking the average amount of time it took to load up over the average life-span of the variable and you'll conclude that the load-up times are inconsequential.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:42 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.