[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [Fun With Perl] Another oddity from the days of assembler



Mark-Jason Dominus <mjd@plover.com> writes:

> > > > this little snippet is not Perl-specific, but it is a bit tricky to
> > > > figure out what is going on:
> 
> When people talk about this stuff in the C newsgroups, someone always
> comes along and spoils the fun by saying `The fastest *and* simplest
> way it to just use a lookup table.'

I was at a job interview (the company shall remain nameless; I *don't*
work there) where this question appeared.  While "build a 256-byte
table" was accepted as an answer, a further speedup was mentioned by
the interviewer: index on 16 bits at a time (and have a modest 64k
table).

-- 
Ariel Scolnicov        |"GCAAGAATTGAACTGTAG"            |ariels@compugen.co.il
Compugen Ltd.          |Tel: +972-2-6795059 (Jerusalem)	\  NEW IMPROVED URL!
72 Pinhas Rosen St.    |Tel: +972-3-7658520 (Main office)`--------------------
Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555  http://3w.compugen.co.il/~ariels

==== Want to unsubscribe from this list? (Don't you love us anymore?)
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org