On Tue, Nov 22, 2011 at 06:41:47AM +0100, Stephen Kitt wrote:
> On Sun, 20 Nov 2011 23:31:43 +0000, Ben Hutchings <b...@decadent.org.uk> 
> wrote:
> > 1. Find all ELF executable/library files.
> > 2. Either:
> >    a. Work out which instructions should be excluded, depending on the
> >       directory.
> >    b. Skip files in hwcap directories and exclude all instructions 
> >       missing from the minimum processor.
> > 3. 'objdump -d | grep' with appropriate instruction regexp; fail if
> >    there's a match.
> 
> http://dev.gentoo.org/~dirtyepic/bin/analyze-x86 is very handy for this,
> although it's quite CPU-intensive.

OMGWTFBBQ...

real    5m26.459s
user    5m25.780s
sys     0m0.108s

How does one write Perl code that slow?  This just has to be intentional --
they used an elaborate construct when a single hash lookup per line of
disassembly is the obvious way.

A quick and dirty change reduces execution time to 5.981s (5.975s of that is
objdump -d).

I also fail to see how the vendor of CPU you happen to be running the script
on would matter -- there might be multiple "minimal" outputs but since the
trade name ("Pentium 4" as opposed to "sse2") is meant for humans only
anyway, there's no reason to be misleading.


Not releasing a fixed version (too ugly to live), but if someone wants it,
please say so, I can polish it for public consumption.

-- 
1KB             // Yo momma uses IPv4!


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111122112458.ga20...@angband.pl

Reply via email to