SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Discussion

Reply
 
Thread Tools Display Modes
Old 01/03/2014, 11:22 AM   #1
Yves
High-roller
 
Yves's Avatar
 
Join Date: Feb 2013
Location: Area 51
Posts: 1,633
Reputation: 122
Default Faster pwn compiler

is they any faster pwn compiler because mine seems to take time just to compile if so can you link me anything that makes it compile to AMX faster without messing any coding up.
__________________
Yves is offline   Reply With Quote
Old 01/03/2014, 11:33 AM   #2
davve95
High-roller
 
davve95's Avatar
 
Join Date: Nov 2009
Location: Sweden
Posts: 3,857
Reputation: 234
Default Re: Faster pwn compiler

http://wiki.sa-mp.com/wiki/Scripting_Editors

I don't know wich one is faster though.
davve95 is offline   Reply With Quote
Old 01/03/2014, 12:27 PM   #3
im
Huge Clucker
 
im's Avatar
 
Join Date: Mar 2012
Location: Romānia
Posts: 217
Reputation: 21
Default Re: Faster pwn compiler

To compile faster, you need a better PC. There is no other way.
All the editors use the same compiler.
__________________
im is offline   Reply With Quote
Old 01/03/2014, 12:43 PM   #4
Misiur
High-roller
 
Misiur's Avatar
 
Join Date: Jul 2009
Location: Poland
Posts: 2,539
Reputation: 552
Default Re: Faster pwn compiler

Yup, pawncc is only choice you have. I'll attempt to write one based on LLVM, but not in the nearest future. https://github.com/Zeex/pawn/ - you can rewrite pawncc better if you know how.
Misiur is offline   Reply With Quote
Old 01/03/2014, 01:17 PM   #5
Jochemd
High-roller
 
Jochemd's Avatar
 
Join Date: Jul 2009
Location: The Netherlands
Posts: 2,502
Reputation: 844
Default Re: Faster pwn compiler

I doubt you can, since this compiler is adapted for SA-MP.
Jochemd is online now   Reply With Quote
Old 01/03/2014, 01:44 PM   #6
MP2
Godfather
 
MP2's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 6,421
Reputation: 973
Default Re: Faster pwn compiler

Quote:
Originally Posted by davve95 View Post
http://wiki.sa-mp.com/wiki/Scripting_Editors

I don't know wich one is faster though.
Those editors are just that - editors. They aren't different compilers. They all use pawncc.exe.
MP2 is offline   Reply With Quote
Old 01/03/2014, 01:47 PM   #7
Mauzen
Godfather
 
Mauzen's Avatar
 
Join Date: Jun 2007
Location: Western Germany
Posts: 5,130
Reputation: 1556
Default Re: Faster pwn compiler

CPU and RAM speed will directly affect the compiler speed.
The best cheap way to speed it up still is to optimize the script, or to optimize the frequency of compiling. Unless you got no idea what youre doing you dont neccessarily need to compile the gamemode every new line. With some plans and attention you can also write several hundred lines without compiling it, and without the risk to add compiler crash bugs that take hours to fix.
Alternatively, just use the compiling time and continue working on the script (you might need to use another editor as not all editors run the compiler in background). The compiler just reads the script once, so theres no problem with saving it once the compiler is running (afaik). However, this kind of scripting can be nasty at some points, especially when youre already in some completely different part of the code when the compiler tells you theres a problem in the part your wrote 15 minutes ago. So in order to use the time effectively you should be able to focus on multiple parts of the script at once. Then youre not losing any time to the slow compiler.
Mauzen is offline   Reply With Quote
Old 01/03/2014, 02:07 PM   #8
xeeZ
Huge Clucker
 
Join Date: Feb 2013
Posts: 317
Reputation: 382
Default Re: Faster pwn compiler

You can try the compiler which Misur has linked to, it runs a bit faster than the official SA-MP compiler. For example, compiling Los Angeles Roleplay took for me about 20% less time in release mode (with -d0) and about 60% in debug mode (-d3).

Last edited by xeeZ; 01/03/2014 at 02:43 PM.
xeeZ is offline   Reply With Quote
Old 01/03/2014, 08:05 PM   #9
Yves
High-roller
 
Yves's Avatar
 
Join Date: Feb 2013
Location: Area 51
Posts: 1,633
Reputation: 122
Default Re: Faster pwn compiler

Quote:
Originally Posted by Mauzen View Post
CPU and RAM speed will directly affect the compiler speed.
The best cheap way to speed it up still is to optimize the script, or to optimize the frequency of compiling. Unless you got no idea what youre doing you dont neccessarily need to compile the gamemode every new line. With some plans and attention you can also write several hundred lines without compiling it, and without the risk to add compiler crash bugs that take hours to fix.
Alternatively, just use the compiling time and continue working on the script (you might need to use another editor as not all editors run the compiler in background). The compiler just reads the script once, so theres no problem with saving it once the compiler is running (afaik). However, this kind of scripting can be nasty at some points, especially when youre already in some completely different part of the code when the compiler tells you theres a problem in the part your wrote 15 minutes ago. So in order to use the time effectively you should be able to focus on multiple parts of the script at once. Then youre not losing any time to the slow compiler.
Good idea but let's say they was tons of mapping codes inside a filerscript tons of lines that would compile faster then the gamemode just saying anyways no idea why Djson makes the compiler slow including dini etc, i think it all depends on how neat, you keep the script from not having alot of lines and pointless things such as // and /* \* and i have never had a crash bug with a compiler yet guessing that's due to the { or } anything really thanks for your great long message about it really useful.


Quote:
Originally Posted by MP2 View Post
Those editors are just that - editors. They aren't different compilers. They all use pawncc.exe.

i have not seen one without using the pawncc.exe


Quote:
Originally Posted by davve95 View Post
http://wiki.sa-mp.com/wiki/Scripting_Editors

I don't know wich one is faster though.
Well wiki tells me to keep my script neat.

i might follow that wiki on my next project.


Quote:
Originally Posted by Misiur View Post
Yup, pawncc is only choice you have. I'll attempt to write one based on LLVM, but not in the nearest future. https://github.com/Zeex/pawn/ - you can rewrite pawncc better if you know how.

A friend of mine goes to college to do something like that not pretty sure maybe he can help me out if he understands pwn scripting.
__________________
Yves is offline   Reply With Quote
Old 02/03/2014, 02:56 PM   #10
ColeMiner
Banned
 
Join Date: Feb 2013
Location: 629
Posts: 166
Reputation: 88
Default Re: Faster pwn compiler

Well the obvious thing to say based on what you said is don't put your maps in the script - put them in a .map file or something and include a map loader. That way you make the script vastly smaller and don't need to re-compile just to change your mapping, just change and re-load the map file.

Of course, the real question is HOW long does it take? Anything around a minute, you could just go make a cup of tea while waiting. Things mentioned like reducing lines (especially comments) are terrible ideas as they make your code less readable and will not make a noticeable difference to compile times (comments are about the fastest thing to compile, because they do nothing).
ColeMiner is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
PAWN Compiler Error Unable to execute Compiler.. Geeboi_Mehdi General 13 07/11/2015 04:26 PM
Please help ( PAWN Compiler "Error Unable to execute Compiler...") morocco Scripting Help 4 05/02/2013 03:34 PM
Which is more faster? Fernado Samuel Scripting Help 19 18/01/2013 03:56 PM
Which is faster ? cotyzor Scripting Help 1 14/01/2013 06:30 AM
[Pawno Compiler] Unable to Execute the Compiler Fabio11 Client Support 6 26/09/2010 09:37 PM


All times are GMT. The time now is 07:55 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.