| 11-14-2008, 12:47 PM | #1 |
I seemingly can't do it myself, because I apparently suck, but anyways. Could someone please do it and post a pic of the results? Oh, and it's my first time trying to benchmark something, so... And if you also could test this script vs those who are in the already? Just overwrite the trigger named DAS. JASS:library DAS initializer Init //! textmacro DAS_make takes TYPE,NAME,SCOPE private keyword $NAME$DATA globals $SCOPE$ string array $NAME$STR[400000] $SCOPE$ boolean array $NAME$DUMMY[400000] $SCOPE$ $NAME$DATA $NAME$store endglobals $SCOPE$ function H2I takes handle h returns integer return h return 0 endfunction private struct $NAME$DATA $TYPE$ dat method operator[] takes string s returns $TYPE$ return .dat endmethod method operator[]= takes string s, $TYPE$ xxx returns nothing set .dat=xxx endmethod endstruct $SCOPE$ function Get$NAME$ takes handle h returns integer local integer r local integer j=-1 local boolean b=false loop set j=j+1 if $NAME$DUMMY[j]==true then set r=$NAME$store[$NAME$STR[H2I(h)-0x100000]] set $NAME$STR[H2I(h)-0x100000]="" set $NAME$DUMMY[H2I(h)-0x100000]=false set b=true endif exitwhen b==true endloop return r endfunction $SCOPE$ function Store$NAME$ takes handle h, integer xxx returns nothing if $NAME$DUMMY[H2I(h)-0x100000]==false then set $NAME$STR[H2I(h)-0x100000]=I2S(H2I(h)) set $NAME$DUMMY[H2I(h)-0x100000]=true set $NAME$store[$NAME$STR[H2I(h)-0x100000]]=xxx endif endfunction $SCOPE$ function $NAME$Init takes nothing returns nothing set $NAME$store=$NAME$DATA.create() endfunction //! endtextmacro //! runtextmacro DAS_make("integer","Struct"," ") private function Init takes nothing returns nothing call StructInit() endfunction endlibrary My Warcraft just freezes. :S It's because I'm testing methods of struct attaching right now, and those are the ways if I came to which actually works so far. The DAS are those that I made. |
| 11-14-2008, 01:47 PM | #2 |
My Warcraft freezes at 0% - I'm assuming the same result as you? Or maybe my PC just sucks? |
| 11-14-2008, 02:28 PM | #3 | |
Quote:
Same result. What am I doing wrong? |
| 11-14-2008, 07:12 PM | #4 |
My computer freezed after 40%. Maybe you just have too many executions? |
| 11-15-2008, 07:55 AM | #5 |
Would that be good or bad? |
