flat assembler
Message board for the users of flat assembler.
Index
> Main > alpha testing - speed improvements Goto page Previous 1, 2, 3, 4 Next |
Author |
|
Tomasz Grysztar 21 Jan 2004, 08:18
The new alpha is here. Only one little update - I've changed the hash algorithm, but with big amounts of labels it shows to be significant change.
I have used the following fasm code to generate the test source with huge amount of synthetical labels: Code: macro num { n = %-1 repeat 8 d = (n shr ((8-%)*4)) and 0Fh if d > 9 d = 'A'+d-10 else d = '0'+d end if db d end repeat } repeat 50000 db 'lbl' num db ':',13,10 end repeat in this version it generates 50000, but even with 100000 parsing with "alpha 2" was quite fast on my machine. Please test it! |
|||
21 Jan 2004, 08:18 |
|
JohnFound 21 Jan 2004, 09:02
Wow, great work. Alpha 2 is really fast on my work machine (PII 450), especially for your example with serial numbered labels:
For 50000 labels: alpha 1 - 25 seconds alpha 2 - 1 second Is this because of faster hash algorithm, or because better distributed hash values? And do you think this will give some performance gain on standard applications? Regards. |
|||
21 Jan 2004, 09:02 |
|
Tomasz Grysztar 21 Jan 2004, 09:10
This is mainly because of much better distributed hash (I have used the FNV-1a algorithm), and so it'll affect only really large sources.
|
|||
21 Jan 2004, 09:10 |
|
JohnFound 21 Jan 2004, 09:57
Privalov wrote: ...and so it'll affect only really large sources. Well, it is good, because I hope assembly written projects will become bigger and bigger. btw: IMHO, now the bottle neck is the preprocessor, it is still slow on compiling multiply files projects. (I mean Fresh but it is valid for big modular projects in general). What you think about it. Regards. |
|||
21 Jan 2004, 09:57 |
|
decard 21 Jan 2004, 10:57
mike.dld wrote: bad test example or what [tested 5 times]? This source is only to generate the actual test file. It will generate a sourcefile that contains 50000 labels. Now just assemble this output file. |
|||
21 Jan 2004, 10:57 |
|
Tommy 21 Jan 2004, 15:21
Very good work Privalov!!! Mine improved from 15.4 secs to 0.2 secs! Very impressive!!! Keep it up!
Cheers, Tommy |
|||
21 Jan 2004, 15:21 |
|
Tomasz Grysztar 21 Jan 2004, 16:02
JohnFound: It's very hard to do any optimizations in preprocessor due to its complexity. But here's my first try - I have added hashing for the symbolic constants and aligned a few loops. Please test whether it does any preprocessing faster for you.
I could make also some hashes for macro names, but in my test it was not affecting speed of compilation at all. |
|||
21 Jan 2004, 16:02 |
|
JohnFound 21 Jan 2004, 16:42
Hi Privalov.
Good work. On my machine the performance gain for the preprocessor is about 25% Here are times for Fresh sources: alpha 2 - preprocessing - 4.973s alpha 3 - preprocessing - 3.759s Regards |
|||
21 Jan 2004, 16:42 |
|
mike.dld 21 Jan 2004, 17:36
feel fool... please someone delete my previous post
trying again: P4-2800, 256, Win2k sp4 50000 labels: Code: flat assembler version 1.50 1 passes, 1.7 seconds, 0 bytes. flat assembler version 1.51 alpha 1 1 passes, 1.2 seconds, 0 bytes. flat assembler version 1.51 alpha 2 1 passes, 0 bytes. 238308 labels: Code: flat assembler version 1.50 1 passes, 117.9 seconds, 0 bytes. flat assembler version 1.51 alpha 1 1 passes, 93.9 seconds, 0 bytes. flat assembler version 1.51 alpha 2 1 passes, 1.0 seconds, 0 bytes. 238309 labels: Code: flat assembler version 1.50 error: out of memory. flat assembler version 1.51 alpha 1 1 passes, 94.0 seconds, 0 bytes. flat assembler version 1.51 alpha 2 1 passes, 1.0 seconds, 0 bytes. |
|||
21 Jan 2004, 17:36 |
|
Tomasz Grysztar 21 Jan 2004, 18:34
scientica: you can try to reduce the pass count on that huge source by using the same trick I have proposed to Fresh recently. I've tested it with alpha 3, and it finally does it in "acceptable" time.
|
|||
21 Jan 2004, 18:34 |
|
vid 21 Jan 2004, 19:39
privalov: are you going to make some low-level optimizations?
|
|||
21 Jan 2004, 19:39 |
|
Tomasz Grysztar 21 Jan 2004, 19:47
Not really, they would be too much processor-dependent.
|
|||
21 Jan 2004, 19:47 |
|
vid 21 Jan 2004, 19:54
i meant general low-level optimization.
Like "lods word [esi]" in get_size_operator (which is used by half instructions) is slower on almost all processors than doing it with mov and add/inc. I meant such things. |
|||
21 Jan 2004, 19:54 |
|
Tomasz Grysztar 21 Jan 2004, 20:31
On most, but not at all. And I was writing it on 80386.
|
|||
21 Jan 2004, 20:31 |
|
scientica 21 Jan 2004, 21:34
timmings from alpha 2:
Code: [frekla@ns1 fasm_tmp]$ ./fasm501a2 GEN.ASM GEN.501a2OUT flat assembler version 1.51 alpha 2 1849 passes, 2154.9 seconds, 4281699 bytes. 243.8 secs faster than the alpha 1 (322,1sec (~5.5 min) faster than 1.50) privalov, I don't know how to solve the memory issue (but it's present for me, I might be due to my uptime 8d 7.5h - lot's of stuf in ram) - but you can't like use malloc(), can you? (I think that would work) _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
21 Jan 2004, 21:34 |
|
Tomasz Grysztar 22 Jan 2004, 07:04
I have tried modifying memory allocation under Linux to be a bit more agressive - please test how does it work now.
|
|||
22 Jan 2004, 07:04 |
|
scientica 23 Jan 2004, 18:23
It seems to work fine now
_________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
23 Jan 2004, 18:23 |
|
Tomasz Grysztar 23 Jan 2004, 19:26
This time trying to speed up the assembler module a bit. Please let me know whether there is any visible difference for you.
|
|||
23 Jan 2004, 19:26 |
|
decard 23 Jan 2004, 20:12
Well this time it wasn't really faster - Fresh compiled about 0,5 sec faster on my machine.
|
|||
23 Jan 2004, 20:12 |
|
Goto page Previous 1, 2, 3, 4 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.