This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Optimization of GAS
- From: Ian Lance Taylor <ian at airs dot com>
- To: Stas Kiselev <stas_kiselev at bk dot ru>
- Cc: binutils at sourceware dot org
- Date: 01 Apr 2005 11:35:38 -0500
- Subject: Re: Optimization of GAS
- References: <E1DHOaZ-000Da8-00.stas_kiselev-bk-ru@f20.mail.ru>
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