Sir,
I downloaded your FASM [ version 1.65.25 for Windows from May 6, 2006], and modified it a bit in order to improve its speed
(after a quick look at the code, I found out that you implemented linear searches for instructions and symbols instead of logarithmic searches).
I had not used ASM since university, about 10 years ago, and I found it would be an interesting exercise in order to get used to using ASM again.
I send the two modified files to you, so that other users can benefit from the improvements.

In order to make integration easier, all my modifications are surrounded by a comment with 'JV BEGIN' or 'JV END'.
It gives a speed-up of approximately 10% when reassembling FASM (on my slow machine).
My programming style in ASM has become quite bad - I need to get used to it again - ,
so my code can certainly be made much faster (about x2 I think: it has now logarithmic complexity, but the constant is quite big due to the bad implementation).

Here is what I modified:

- I used a dichotomic search instead of a linear search in get_instruction
[I renamed it get_instr_dich, to be sure not to forget any call, and removed all the db 0 in the table]

- I used a dichotomic search  instead of a linear search for get_symbol
[I introduced a new function get_symb_dich, and only replaced the calls to get_symbol
for the tables data_directive and symbols.
These tables are now sorted by length, just like the instructions: I just removed the length information and the db 0
]

NB:
- it would be interesting to use macros to provide the length to get_symb_dich
 and use it for the other tables.
- I left the lower_case calls even if no symbol is found, like in the original code (I was afraid of side-effects) but I think there are useless calls to it: it should just be called once before all the searches.

Sincerely,
Joel Vibert