Raised This Month: $ Target: $400
 0% 

.amxx file larger than .sma is there a meaning?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
d0g F1R3
New Member
Join Date: Mar 2008
Location: Price is Right showroom.
Old 04-12-2008 , 18:52   .amxx file larger than .sma is there a meaning?
Reply With Quote #1

Since im still learning i've just been throwing together plugins. Some of them i notice that the .amxx file is LARGER than the .sma. Is there any real meaning to this? Such as inefficient scripting or just crappy scripting? Just wondering maybe im doing something wrong.
__________________
the cake is a lie.....

Last edited by d0g F1R3; 04-12-2008 at 18:54. Reason: left out info
d0g F1R3 is offline
Send a message via MSN to d0g F1R3
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-12-2008 , 21:02   Re: .amxx file larger than .sma is there a meaning?
Reply With Quote #2

The .amxx is always bigger than the .sma. Open up the .amxx with notepad and you'll see that the compiler makes a bunch of mumbo jumbo that's not readable. It adds a lot of characters.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-12-2008 , 21:10   Re: .amxx file larger than .sma is there a meaning?
Reply With Quote #3

Quote:
Originally Posted by v3x View Post
mumbo jumbo.
i lol'd
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 04-12-2008 , 23:00   Re: .amxx file larger than .sma is there a meaning?
Reply With Quote #4

A better explenation would be that it translates from the language we write in to binary language that the computer can understand.
As you know not many words are the same in two different languages. You can say that the computer uses longer words than we do.

And the .amxx does not need to be bigger. Add a lot of new rows and the compiled one would be smaller.
[ --<-@ ] Black Rose is offline
Battousai-sama
Veteran Member
Join Date: Jul 2007
Old 04-13-2008 , 00:26   Re: .amxx file larger than .sma is there a meaning?
Reply With Quote #5

Quote:
Originally Posted by X-olent View Post
i lol'd
word.
__________________
Battousai-sama is offline
Send a message via MSN to Battousai-sama
hoboman
Senior Member
Join Date: Jul 2007
Old 04-13-2008 , 00:46   Re: .amxx file larger than .sma is there a meaning?
Reply With Quote #6

Quote:
Originally Posted by d0g F1R3 View Post
Since im still learning i've just been throwing together plugins. Some of them i notice that the .amxx file is LARGER than the .sma. Is there any real meaning to this? Such as inefficient scripting or just crappy scripting? Just wondering maybe im doing something wrong.
let me put it this way...you can write 5 pages of comments and get a huge .sma and a tiny .amxx or you can declare and loop through some ginormous array ( like new cheese[100][100][100][100] ) and get a ginormous .amxx and a tiny .sma

You cannot tell anything about a plugin's efficiency from the size of a plugin's binary alone. I think the size of the binary is just the size of the allocated variables or something, but I am not sure.
__________________
hoboman is offline
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 04-13-2008 , 01:57   Re: .amxx file larger than .sma is there a meaning?
Reply With Quote #7

Variables do almost no change to .amxx file size ... constants do. You need to realize that by including files (#include), you include plenty of constats (engine, fakemeta etc), un-stocked functions and-so-on.
__________________
alien is offline
Send a message via ICQ to alien
hoboman
Senior Member
Join Date: Jul 2007
Old 04-13-2008 , 02:36   Re: .amxx file larger than .sma is there a meaning?
Reply With Quote #8

Quote:
Originally Posted by alien View Post
Variables do almost no change to .amxx file size ..
sure they do...I just made like 50kb .amxx with

Code:
new cheese[100][100][100]
for(new i;i<100;i++)
{
   for(new j;j<100;j++)
   {
      for(new k;k<100;k++)
      {
            cheese[i][j][k]++
      }
   }
}
__________________
hoboman is offline
sawce
The null pointer exception error and virtual machine bug
Join Date: Oct 2004
Old 04-13-2008 , 02:54   Re: .amxx file larger than .sma is there a meaning?
Reply With Quote #9

Global and static variables are stored within the data section of a plugin, so they do affect a plugin's compiled size. I'm pretty sure stack space is also saved within the file too, although I could be mistaken. So a really large local variable would probably throw it off a bit too.


Also, there are actually 2 different plugins compiled into one for each .amxx file, the 32bit and 64bit versions of each plugin is saved from within the .amxx file. Although the one that isn't meant for the server's architecture is entirely disregarded and has no effect at all. But it uses the zlib library to compress them some.
__________________
fyren sucks
sawce is offline
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 04-13-2008 , 03:24   Re: .amxx file larger than .sma is there a meaning?
Reply With Quote #10

Yes, you're right. But could million (or 100-million cell array you used in your previous post) be considered as real-life example?
__________________
alien is offline
Send a message via ICQ to alien
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 02:08.


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