Nothing, use them. Almost any compiler made in the last 6 years will be able to optimize them very well by inlining them or other neat tricks.
Solo Ace - Mon May 23, 2005 6:52 pm
Post subject:
It's not my intention to bump or "hijack" this thread, I just thought it'd be good thread to post the question I wanted to ask a while ago in now.
I'm using MS Visual C++ 2003 and I was wondering a while back why my (even release builds) executables were big.
The language to compile it in doesn't seem to matter since the sizes were exactly the same.
Debug - 106.496
Release - 36.864
When I disassembled a program someone else wrote and compiled (in release mode) with MS Visual C++ 6 I could clearly see what happened in the program and where it ended, without any other stuff really.
When I disassemble my own hello world executable (release build) I see a lot other stuff next to what I really wrote, like exception strings as "\r\nThis application has requested the Runtime to terminate it in an unusual way.\nPlease contact the application's support team for more information.\r\n" and a MessageBox.
I understand why there are exceptions for the runtime in it, but are these really necessary?
How did he turn them off, os it just that his verion is too old that runtime exception warnings weren't implemented?
All these exception warnings seems to increase the size of executables.
Is my personal edition forcing me to have 'larger-than-normal' executables?
If so, I'm sure he used some warez'd professional edition (if that exists for VC++ 6).
Heh, I have no idea how to decrease the size, someone tell me.
Or, shouldn't I be worried at all?
Oh yeah, what's up with VC++ putting paths to the .pdf file of the project in the exe?
2dragons - Mon May 23, 2005 10:32 pm
Post subject:
Tact check.
Cyan~Fire - Tue May 24, 2005 1:25 pm
Post subject:
VC++6 is what I use, and it's good. So I don't know all that much about later version, sorry.
Anonymous - Fri Jun 10, 2005 9:02 am
Post subject:
If the complaints on optimization are over, then Id like to refer to an "alternate design option." Whilst jealousy exudes from every pore that you beat me to the finish on this particular module, I cann still trip you up on some inane feature. Go check out the prize plugin I wrote for mervbot, I believe version 3. That one is SQL and Im sure can easily be changed to fit into a module and utilize the already existing ASSS MySQL tables. It works well and (ultimately as your database grows) will be faster than any text file reading you do on your own.
Its probably available at sscentral.com/bots
Anonymous - Fri Jun 10, 2005 9:19 am
Post subject:
And prize3 is months out of date, I fixed some ugly code and the expiration works properly. All dates are stored as per the time on the mysql server, meaning localization is not needed. Ill update it when I get home on the 21st.
50% Packetloss - Fri Jun 10, 2005 2:28 pm
Post subject:
lol, at max, a zone would nearly never need more than 100 prizes in the database. In the zone I play in, I don't think I've ever seen more than 20-30 prizes in the bot. Even in large zones, the events have a lot more people but only 1-5 events are run at a time and thus not very many people are prized, assuming that there are 1-3 winners from each event. So in my opinion, mysql is overkill.
But there is no doubt in my mind that you could write a better module. There is plenty I left out and I'm sure there are ideas I didn't think of that belong in the bot. But I think you are a far more capable programmer than myself, so maybe your expertise are better suited on larger module ideas.
Come to think of it, I should probably make the mod-commands in the above module global to ALLARENAS, I'll update it later.