| 09-09-2006, 05:21 PM | #1 |
I am repeating this benchmark I am also making it more complete. I am just attaching the file, I don't want to write stuff, well here are my conclusions.
|
| 09-10-2006, 02:35 PM | #2 |
I guess nobody uses handlevars anymore, so it's a kind of .. pointless? |
| 09-10-2006, 02:41 PM | #3 |
I wouldn't say that nobody uses handlevars anymore, also someone was bugging me about H2I's speed. |
| 09-10-2006, 02:46 PM | #4 |
Ok, then I must say nobody 'should' use handlevars anymore. |
| 09-10-2006, 03:16 PM | #5 |
Plenty of people still do. Check spell resource submissions. |
| 09-10-2006, 04:04 PM | #6 | |
Quote:
|
| 09-10-2006, 04:12 PM | #7 |
I think he means handlevars, where I2S(H2I()) is computed each time. |
| 09-15-2006, 03:42 PM | #8 |
Blue is right- |
| 09-15-2006, 10:15 PM | #9 |
Well, I would not know how to "not use" handle vars. How can you be dynamic there? |
| 09-15-2006, 10:26 PM | #10 |
You could use some form of system to dynamically allocate space on arrays (which CSCache uses). At present, I'm experimenting with using the return bug to speed up converting int to string, and it seems to work fine (with a little adjustment), and a considerable, but not massive, amount faster. |
| 09-16-2006, 02:27 AM | #11 |
I don't really think the speed improvement is worth the risk and they do fail when loading saved games, now if you have found a way to fix it then make it public |
| 09-16-2006, 08:22 AM | #12 |
Well, at present my idea is just generating a load of strings at start up (which could then also be done at loading of the game). That ought to work. That's a stupid method, however. Using a few globals would be much better, something like this: JASS:function handleI2S takes integer i returns string set i = i - 1048576 if i <= 8150 then return udg_I2Sa[i] elseif i <= 16300 then return udg_I2Sb[i-8150] elseif i <= 24450 then return udg_I2Sb[i-16300] else return I2S(i) endif endfunction Should be massively faster, and completely safe (just setup the globals at start up). |
| 09-16-2006, 12:23 PM | #13 |
I don't know, it is not like we store/load strings on many speed intensive processes. |
| 09-16-2006, 12:34 PM | #14 |
I would say ints are the type you can use for (almost) everything. |
| 09-16-2006, 12:55 PM | #15 |
Because everything except reals is an int, or is pointed to by an int. |
