CS-Reloaded Banner
Welcome, Guest. Please Login or Register.
Download Second Map Pack!
Get more packs here

Home Help Search Login Register

CSReloaded Forums  |  CSR Staff  |  Staff Discussion (Moderators: Ryo-Ohki, Porter, Father Ribs, Guardian_Tenshi, Deuce, Justboy, Yuna)  |  Topic: Thinking out loud - optimizations
Pages: [1] Reply Notify of replies
   Author  Topic: Thinking out loud - optimizations  (Read 188 times)
Guardian_Tenshi
Global Moderator
*****
Karma: +53/-26

Offline

Gender: Male
Posts: 1114

276733708 276733708 clanguardian2003 Ol+Grimmy
View Profile WWW E-Mail
Thinking out loud - optimizations
« on: September 22, 2004, 02:12:39 PM »
Reply with quote

I know porter wanted to start looking into optimizing alot of the chat line optimizations, that I guess because of all our other plugins are adding up?  I feel like being in this Algorithm class that i should step up and help here.  I like the idea of using a map for the swear filter, or even a binary tree.  I think as long as we can write recursive funtions with loops we should be able to make/define container classes even if they aren't part of the Half-Life STL.  If need be, I can start just trying to write some standard containers...operator overload would be nice, but no NEEDED.

Tenshi
Logged

Grounded
Admin Team
CSR Connoisseur
*****
Karma: +158/-21

Offline

Posts: 3176


View Profile
Re:Thinking out loud - optimizations
« Reply #1 on: September 22, 2004, 03:11:06 PM »
Reply with quote

You just blew my mind
Logged
PanchoDaz
CSR Connoisseur
*****
Karma: +28/-5

Offline

Gender: Male
Posts: 552


View Profile
Re:Thinking out loud - optimizations
« Reply #2 on: September 22, 2004, 03:13:01 PM »
Reply with quote

Quote from: Grounded on September 22, 2004, 03:11:06 PM
You just blew my mind

Logged
Porter
[Wumpa]
Board Admin
*****
Karma: +176/--88

Offline

Gender: Male
Posts: 3910

Wumpa+Porter
View Profile WWW E-Mail
Re:Thinking out loud - optimizations
« Reply #3 on: September 22, 2004, 04:11:10 PM »
Reply with quote

Unfortunately, I think Tenshi is overestimating what we have to work with.

To be honest, I have no way of accurately profiling (big word for "measuring") the performance of the server with and without plugins. Even if I did, I couldn't even venture a guess as to how much of an effect all of our plugins have, and on which components of the server engine that effect is the greatest.

As for optimizing, I think adding data structures would really only increase overhead. Again, Tenshi's perspective is different form mine, and if he had more familiarity with how AM plugins are written, he would probably understand the limitations imposed by the language better. To throw an example out there: a typical binary tree implementation could easily run to 1,000 lines of C code, but the average length of the plugins on CSR is 150 lines. Even the biggest ones don't go past 300 lines, and re-writing the plugins to USE a new data structure would likely ADD to that number. If optimizations are going to be made, I don't think this is they way it's going to happen.

I think our best bet right now would be to get a couple people really familiar with writing AdminMod plugins (Tenshi included) so that we can go back to our current set as a team and try to find optimizations that could be made in each plugin.
Logged

[Wumpa] Porter
  --Silent, professional, lethal... sometimes.
Guardian_Tenshi
Global Moderator
*****
Karma: +53/-26

Offline

Gender: Male
Posts: 1114

276733708 276733708 clanguardian2003 Ol+Grimmy
View Profile WWW E-Mail
Re:Thinking out loud - optimizations
« Reply #4 on: September 22, 2004, 11:53:15 PM »
Reply with quote

meh, i half expected you to say something like that 

but at least now i know where are going, and proved that every now and then i come up with a good idea...even if it won't work.

Tenshi
Logged

Porter
[Wumpa]
Board Admin
*****
Karma: +176/--88

Offline

Gender: Male
Posts: 3910

Wumpa+Porter
View Profile WWW E-Mail
Re:Thinking out loud - optimizations
« Reply #5 on: September 23, 2004, 04:48:52 PM »
Reply with quote

Okay, so after your schoolwork and everything else you have to do, get to learning Small!
Logged

[Wumpa] Porter
  --Silent, professional, lethal... sometimes.
Nubbinator
CSR Veteran
***
Karma: +10/-5

Offline

Gender: Male
Posts: 190

Vv+Targash+vV
View Profile WWW
Re:Thinking out loud - optimizations
« Reply #6 on: September 26, 2004, 10:39:24 AM »
Reply with quote

Something you might want to look into is which compiler for small you are using for all the plugins.  If you have not heard of the JIT or ASM compilers, I might suggest looking into them if you are running so many plugins.  Apparently the speed difference is outstanding, nearly cutting the CPU time by quarter!!!  Unfortunatly I don't know if they will work with adminmod.  They are currently advertising this to work with AMX and AMXX (ick).  If you have never heard of these plugins, just think clanmod.  I'm sure if you want to optimize your plugins, if this works then it will probably be your best bet.  Best thing is, you don't need to learn anything, its the same coding used (from what I know) you just have to recompile and its done!  I'll try to see what I can find for compatibility with adminmod.
Logged

-=BA=- Through and through.
Porter
[Wumpa]
Board Admin
*****
Karma: +176/--88

Offline

Gender: Male
Posts: 3910

Wumpa+Porter
View Profile WWW E-Mail
Re:Thinking out loud - optimizations
« Reply #7 on: September 26, 2004, 02:14:28 PM »
Reply with quote

A more efficient compiler could have a significant effect, but I guess I'm still stuck on the scale issue. We're only talking about a couple hundred lines of code apiece. I don't think there are that many different ways to compile a program that small written in a language that is that simple, but maybe I'm wrong. It's worth a shot, that's for sure.

At the same time, I don't think learning something is a bad idea, as I certainly wouldn't mind having a handful of people to handle bugs and feature requests instead of doing it all myself whenever I can find a spare bit of time. Having some of you learn Small can only be a good thing for everyone, regardless of whether we have a better compiler or not.
Logged

[Wumpa] Porter
  --Silent, professional, lethal... sometimes.
Nubbinator
CSR Veteran
***
Karma: +10/-5

Offline

Gender: Male
Posts: 190

Vv+Targash+vV
View Profile WWW
Re:Thinking out loud - optimizations
« Reply #8 on: September 26, 2004, 02:58:49 PM »
Reply with quote

You'd be suprised at what they are claiming.  Check this link out :

http://www.tcwonline.org/~dvander/bench.htm

The lower the number, the better (as stated in the document  ).  If these are true, then you don't have to worry about recoding, but yes, having people that know SMALL is very important.  You never know when you need something coded.
Logged

-=BA=- Through and through.
Porter
[Wumpa]
Board Admin
*****
Karma: +176/--88

Offline

Gender: Male
Posts: 3910

Wumpa+Porter
View Profile WWW E-Mail
Re:Thinking out loud - optimizations
« Reply #9 on: September 27, 2004, 07:01:49 AM »
Reply with quote

You should keep in mind though that the results are produced from a benchmark plugin iterating over 1,400,000,000 loops (that's one and a half BILLION btw). The most any of our plugins ever do is 160 (the number of maps on the server).

That's not to say it's not worth investigating still, just that scale is still a very large consideration. Did you find any other links for this stuff? Maybe to the JIT compiler homepage? I haven't really had time to look yet.
Logged

[Wumpa] Porter
  --Silent, professional, lethal... sometimes.
Nubbinator
CSR Veteran
***
Karma: +10/-5

Offline

Gender: Male
Posts: 190

Vv+Targash+vV
View Profile WWW
Re:Thinking out loud - optimizations
« Reply #10 on: September 28, 2004, 12:52:43 PM »
Reply with quote

You can download AMXX to get the newest compilers.  I havn't tried the compiler with AM though.

http://www.amxmodx.org/ - AMXX
http://www.compuphase.com/small.htm - Small Homepage

The small homepage is actually a good source for info.  I think I'll test the JIT compiler with AM tonight and let you know what happens. 
Logged

-=BA=- Through and through.
Grounded
Admin Team
CSR Connoisseur
*****
Karma: +158/-21

Offline

Posts: 3176


View Profile
Re:Thinking out loud - optimizations
« Reply #11 on: September 28, 2004, 02:19:57 PM »
Reply with quote

Quote from: Porter on September 27, 2004, 07:01:49 AM
You should keep in mind though that the results are produced from a benchmark plugin iterating over 1,400,000,000 loops (that's one and a half BILLION btw). The most any of our plugins ever do is 160 (the number of maps on the server).

That's not to say it's not worth investigating still, just that scale is still a very large consideration. Did you find any other links for this stuff? Maybe to the JIT compiler homepage? I haven't really had time to look yet.

1,400,000,000 loops eh? I do more than that before breakfast in the morning
Logged
Enialator
CSR Randomness King
CSR Connoisseur
*****
Karma: +41/-57

Offline

Gender: Male
Posts: 1161


View Profile
Re:Thinking out loud - optimizations
« Reply #12 on: September 28, 2004, 02:22:54 PM »
Reply with quote

My God you might as well be naked you two, sucking helium and playing with the best erector set available for Nerds are cool too! 
Logged

PanchoDaz
CSR Connoisseur
*****
Karma: +28/-5

Offline

Gender: Male
Posts: 552


View Profile
Re:Thinking out loud - optimizations
« Reply #13 on: September 28, 2004, 02:33:00 PM »
Reply with quote

Quote:
1,400,000,000 loops eh? I do more than that before breakfast in the morning 

I used to - but then it just got a bit repetitive  
Logged
Pages: [1] Reply Notify of replies 
CSReloaded Forums  |  CSR Staff  |  Staff Discussion (Moderators: Ryo-Ohki, Porter, Father Ribs, Guardian_Tenshi, Deuce, Justboy, Yuna)  |  Topic: Thinking out loud - optimizations
Jump to: 

Powered by PHP CSReloaded Forums | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
Powered by MySQL
:[ Site Design by Ryo, scripts and backends by Porter and Ryo, banner by Supafly! Powered by PHP and MySQL ]:
Page created in 0.917 seconds.