Raised This Month: $51 Target: $400
 12% 

Enhanced stocks


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-17-2005 , 17:42   Enhanced stocks
Reply With Quote #1

This a stock pack, updating and fixing the default stocks, along with making many of them defines for speed, and adding some stocks collected and made from scratch.
Attached Files
File Type: zip enhanced_stocks.zip (24.3 KB, 330 views)
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Anpheus
Senior Member
Join Date: Aug 2004
Old 03-19-2005 , 18:34  
Reply With Quote #2

I recommend adding the dispatchkeyvalue equivalent. May have to look for which one is the correct one, I remember seeing many engine functions related to key values in the fakemeta constants.
Anpheus is offline
harbu
Senior Member
Join Date: Aug 2004
Location: Finland
Old 03-19-2005 , 18:48  
Reply With Quote #3

So exactly what are the changes/additions? Perhaps a list would make people more intrested.
__________________
harbu is offline
Send a message via MSN to harbu
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-19-2005 , 21:44  
Reply With Quote #4

Updates:
All availible stocks are substituted for defines, rendering a large speed increase, and a file size decrease

BrainBread Stocks are added

TS mod stocks for SET additions to GET functions are added

FUN_STOCKS eliminates all but two of the FUN module natives, allowing you to eliminate that module almost completely

ENGINE_TO_FM system allows you to render an ENGINE based module almost entirely in FM.

CVAULT include allows for a simple but advanced stock vault.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
BAILOPAN
Join Date: Jan 2004
Old 03-19-2005 , 23:53  
Reply With Quote #5

Some neat stuff, but "speed" could be misleading. you have to be careful.

"stock" to a "define" means you're replacing an optional function declaration with inline code. Stocks are not inlined. This could potentially cause unwanted results. Also, it could actually decrease speed in every possible way - it could generate more code and take longer to parse.

Also, natives are much, much faster than anything else, to the point where it almost doesn't matter how they're implemented. This means that your stocks for replacing clear-cut natives are a huge performance hit, and unless you specifically modified them for different features, I would not use them.

Lastly, replacing fun functions with fakemeta functions is a minor performance hit. The FM natives need to crawl through a list of switch cases whereas fun statements have virtually immediate execution.

So, I'd say these stocks are not useful for anything other than seeing the implementation of things in Small, because the performance hit is too drastic:
engine_to_fm
fun_to_fm
fun_stocks

However, the stock wrapper->define ones are very nice... I'll look into merging these into the next release.

Thanks for some interesting stuff to look at
__________________
egg
BAILOPAN is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-20-2005 , 02:14  
Reply With Quote #6

I only did that because FUN and ENGINE tend to make my ded server lag, while FM doesnt, thus using ONE module that doesnt lag as opposed to three that do lag means the performance hit is acceptable.

Of course, a lot of the FM pev and set_pev's dont seem to function properly now a day, so a lot of my plugins get re-written for engine anyway.

I really dont like FUN module...
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
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 -4. The time now is 06:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode