Optimization of GAS

Ian Lance Taylor ian@airs.com
Fri Apr 1 16:35:00 GMT 2005


Stas Kiselev <stas_kiselev@bk.ru> writes:

> I want to make GAS faster. I profiled it and found out that lots of the 
> time takes on working with hash. What do you thing about changing hash 
> mechanism into hash_map from stl. Will it work faster ?

STL is C++ code.  gas is written in C.  So using hash_map directly
would be rather difficult.

I expect that it is possible to speed up the hash code in gas.  It
would also be interesting to see if it can be called less often.  A
common usage is simply looking up instruction mnemonics, in which the
set of instructions is fixed at the start of assembly, and really, if
we do appropriate tests, it is fixed when the assembler is built.  Can
we take advantage of that, perhaps by doing perfect hashing?

Ian



More information about the Binutils mailing list