| 10-05-2010, 10:34 AM | #1 | |||
Hell o, am back thanks to conscription and the stupid bundeswehr-fuckers i had to make an involuntary pause in my mapping activities... onTopic: today i checked some of my maps and found lots of unperformant code, so i decided to write an optimizer for it and viola here it is. requires microsoft .Net framework 3.5 or higher usage: quite simple - get the executeable - extract the "war3map.j" from your map or use another .j file - execute it - drop your beloved piece of code (.j-file) - press enter - wait some sec - go to the displayed output-path and use the file with "_optimized.j" - check the code again (if you don't trust me) - name it "war3map.j" and place it in your map again ATTENTION: PLEASE FOR THE SAKE OF THE OLD GODS USE ONLY FILES W I T H O U T SYNTAX-ERRORS, otherwise the program will bug or crash
if you wanna have the source, pm me...
|
| 10-05-2010, 01:13 PM | #2 |
post any code before and after optimization. i suggest you to optimize code of any custom blizzard map, skibi for exs |
| 10-05-2010, 01:57 PM | #3 |
attached files in first post... |
| 10-05-2010, 04:45 PM | #4 |
your system mess with spaces, easy to detect on jasshelper__initstructs25167235 also constant inline failed for functions and basic mathematic operations. |
| 10-05-2010, 06:17 PM | #5 | ||
Quote:
can't follow you...plz explain further Quote:
ähm yea, maybe i should mention that it does atm only inline constant GLOBALS with containing no function calls or other operations, cause in some cases the code would become slower when inlining these... ex JASS:globals constant real HardToCalc = SquareRoot(Cos(12)*Sin(32)*Atan(45)+I2R(R2I(Pow(Cos(18+Tan(8)),Atan2(6,13))))) function Test takes real f returns nothing local integer i=0 loop exitwhen i>HardToCalc*f set i=i+Atan2(HardToCalc,HardToCalc+1) endloop endfunction i know it's a constructed and exaggerated example, but something like this can happen...therefore I'm searching a way to precalculate such constants...buggy atm |
| 10-06-2010, 04:02 PM | #6 |
its possible to calculate this inside optimizer (just include some limits, 2-3 levels of variables) and pass actual data into inline. |
| 10-07-2010, 08:42 AM | #7 | |
Quote:
i know, that's what i'm trying to add in the next version...ufo it currently bugs heavyly or miscalculates (2+3*4 = 20 )what's with the space-mess? |
| 10-07-2010, 10:39 AM | #8 |
your optimizer add spaces, i posted function name, check before and after. to calculate properly you shoud sort actions by priority levels or hook into some other math library. |
| 10-07-2010, 11:35 AM | #9 | |
Quote:
yea...and where's the problem/bug? |
| 10-08-2010, 03:40 AM | #10 |
this is dead data, it shoud remove useless spaces not add em. |
| 10-08-2010, 05:54 AM | #11 | |
Quote:
|
| 10-10-2010, 06:39 PM | #12 |
No offence and all, but does it more than wc3mapoptimizer ? I suppose so, but could you detail the differences ? |
| 12-12-2010, 05:24 PM | #13 |
lol...when i want to remove empty spaces i do ctrl h and enter 4 spaces in top line, nothing in bottom line and hit all and bam, code optimized...well, at least primed for optimization. if your code adds those 4 spaces back everytime it's run...then it's trash. |
| 03-02-2011, 10:17 AM | #14 |
Having spaces in your code does nothing at all in performance nor KB size. |
