Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2009-01-29 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
January 29, 2009, 10:50:36 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Hall of Fame - Designer
Must Visit it
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1]   Go Down
  Print  
Author Topic: Speedy coding  (Read 102 times)
Namolem
Level 7 Expert
*****
Online Online

Russian Federation

Posts: 175




Namolem
« on: January 21, 2009, 12:27:09 PM »

I tested these with profile and get that:
Correct me if I am wrong
All testes were with 1000 iterations

if (server_var(asd) = 0) faster than ifx false(asd) for 32.43840749%
if (server_var(asd) != 0) faster than ifx true(asd) for 34.44989107%
es es_xif (server_var(asd) = 4) then is faster than if (server_var(asd) = 4) then for 5.095211322%
« Last Edit: January 21, 2009, 12:30:27 PM by Namolem » Logged
Berettonawak
Watchdogs
Level 7 Expert
*****
Online Online

France France

Posts: 1366


Big Berettonawak is watching you...



Bifkids

myServer 81.93.251.44:27015
(Warning: click connects through Steam)
« Reply #1 on: January 21, 2009, 01:21:20 PM »

If you have old ES, es es_x will be faster, but not if you use latest Tongue
Logged

Namolem
Level 7 Expert
*****
Online Online

Russian Federation

Posts: 175




Namolem
« Reply #2 on: January 21, 2009, 01:23:23 PM »

I have ES 2.0.250
Logged
Namolem
Level 7 Expert
*****
Online Online

Russian Federation

Posts: 175




Namolem
« Reply #3 on: January 26, 2009, 02:28:10 PM »

I think I did something wrong that time
Code:
    while "server_var(count) < 1000" "es_keygetvalue wcs_tmp WCSraces 26 allow_only;es_xmath count + 1"
profile end es_
es_xset count 0
es_xset wcs_tmp 0
profile begin es_es_x
    while "server_var(count) < 1000" "es es_xkeygetvalue wcs_tmp WCSraces 26 allow_only;es_xmath count + 1"
profile end es_es_x

Result:
Code:
es_     : 0.124566
es_es_x : 0.134495

es_     : 0.121504
es_es_x : 0.134432

es_     : 0.133385
es_es_x : 0.134209

es_     : 0.126381
es_es_x : 0.133977

es_     : 0.123273
es_es_x : 0.130629

es_     : 0.122069
es_es_x : 0.135008

es_     : 0.127298
es_es_x : 0.134316

es_     : 0.122744
es_es_x : 0.132055

es_     : 0.135849
es_es_x : 0.132187

es_     : 0.123872
es_es_x : 0.131534
Logged
Berettonawak
Watchdogs
Level 7 Expert
*****
Online Online

France France

Posts: 1366


Big Berettonawak is watching you...



Bifkids

myServer 81.93.251.44:27015
(Warning: click connects through Steam)
« Reply #4 on: January 26, 2009, 04:16:07 PM »

Why would it be wrong?
IT HAS GOOD RESULTS
THAT IS NORMAL
ES_ IS FASTER THAN ES ES_X
EVERYONE HAS TOLD YOU ON EVENTSCRIPTS CHANNEL LOL
Logged

maxxi
Level 7 Expert
*****
Online Online

Netherlands Netherlands

Posts: 539





myServer 81.26.221.156:27015
(Warning: click connects through Steam)
« Reply #5 on: January 26, 2009, 04:43:23 PM »

Why would it be wrong?
IT HAS GOOD RESULTS
THAT IS NORMAL
ES_ IS FASTER THAN ES ES_X
EVERYONE HAS TOLD YOU ON EVENTSCRIPTS CHANNEL LOL
guess he ment the first time
Logged

Server = work in progress Smiley
Namolem
Level 7 Expert
*****
Online Online

Russian Federation

Posts: 175




Namolem
« Reply #6 on: January 26, 2009, 05:10:40 PM »

yes)
Logged
[Oddity]TeacherCreature
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 985




bonggged

myServer 208.167.227.103:27015
(Warning: click connects through Steam)
« Reply #7 on: January 26, 2009, 06:26:11 PM »

I use eventscripts v.2.0.0.247 and "es es_xif" is way faster than "if" when you dont need expansion!
Why expand for no reason that seems stupid.

« Last Edit: January 27, 2009, 02:14:17 AM by [Oddity]TeacherCreature » Logged

Namolem
Level 7 Expert
*****
Online Online

Russian Federation

Posts: 175




Namolem
« Reply #8 on: January 26, 2009, 06:49:25 PM »

>expand for no reason

What do you mean? I think they expand same
Logged
Berettonawak
Watchdogs
Level 7 Expert
*****
Online Online

France France

Posts: 1366


Big Berettonawak is watching you...



Bifkids

myServer 81.93.251.44:27015
(Warning: click connects through Steam)
« Reply #9 on: January 26, 2009, 07:36:13 PM »

He meant in what you said you could just have used es_xkeygetvalue Tongue
Logged

[Oddity]TeacherCreature
Level 7 Expert
*****
Offline Offline

United States United States

Posts: 985




bonggged

myServer 208.167.227.103:27015
(Warning: click connects through Steam)
« Reply #10 on: January 27, 2009, 02:15:07 AM »

I beleive version 1.5 made expandign variables fast by using the commands without the "x".
It all depends if you are expanding or not.
Logged

Namolem
Level 7 Expert
*****
Online Online

Russian Federation

Posts: 175




Namolem
« Reply #11 on: January 27, 2009, 04:38:00 PM »

1500 Iterations
Code:
block test
{
es_xset ccount 0
es_xset tmp 4
es_xset count 0
es_xset txif 0
es_xset tif 0
es_xset wcs_tmp 0

profile begin tif
    while "server_var(count) < 2000" "es_xdoblock acc/test3;es_xmath count + 1"
profile end tif

es_xset count 0
es_xset wcs_tmp 0

profile begin txif
    while "server_var(count) < 2000" "es_xdoblock acc/test2;es_xmath count + 1"
profile end txif
}
block test2
{
es es_xif (server_var(tmp) > 3) then es_xkeygetvalue wcs_tmp WCSraces 26 allow_only;
}
block test3
{
if (server_var(tmp) > 3) then es_xkeygetvalue wcs_tmp WCSraces 26 allow_only;
}
Result:
Code:
Profiler timer tif ended: 0.548734
Profiler timer txif ended: 0.577039
Logged
Berettonawak
Watchdogs
Level 7 Expert
*****
Online Online

France France

Posts: 1366


Big Berettonawak is watching you...



Bifkids

myServer 81.93.251.44:27015
(Warning: click connects through Steam)
« Reply #12 on: January 27, 2009, 05:14:59 PM »

why ";" at the end of the line? this is not php  Cheesy
Logged

Namolem
Level 7 Expert
*****
Online Online

Russian Federation

Posts: 175




Namolem
« Reply #13 on: January 27, 2009, 05:26:19 PM »

cuz i copyed inattentive) no matter
Logged
Berettonawak
Watchdogs
Level 7 Expert
*****
Online Online

France France

Posts: 1366


Big Berettonawak is watching you...



Bifkids

myServer 81.93.251.44:27015
(Warning: click connects through Steam)
« Reply #14 on: January 27, 2009, 05:31:57 PM »

as you said, no matter Tongue
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 10:46:24 PM
hehe:D

would someone be nice to test the new action man ?
Today at 10:40:28 PM
lol Grin
Today at 10:39:54 PM
have done that too now, then it says: NOTHING Tongue
Today at 10:30:31 PM
not boring Grin
that's cuz you don't use any variables after /P
es_xdoblock wcs/WCSultimates/lol
is faster than es_doblock, since it doesn't have to check for vars Grin
Today at 10:27:10 PM
the new racefile checker is hard to get smart on,

first it tells me:es_command is better than es es_xcommand (es_xdoblock bla bla) then i change to es_doblock, and it says: unneccesary expand es_doblock bla bla. hmm.. :s
Today at 09:39:26 PM
booring
Today at 01:46:23 AM
Drink Coca Cola xD
Recent
[Today at 10:45:12 PM]

[Today at 10:36:08 PM]

[Today at 09:56:18 PM]

[Today at 09:16:10 PM]

[Today at 08:55:57 PM]

[Today at 08:33:05 PM]

[Today at 08:31:12 PM]

[Today at 08:09:49 PM]

[Today at 07:48:08 PM]

[Today at 07:45:28 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.056 seconds with 26 queries.