On Sun, 25 Oct 2009 17:06:31 -0700 Ryan Niebur wrote:

> On Mon, Oct 26, 2009 at 12:21:28AM +0100, Francesco Poli wrote:
[...]
> > One of the proposed solutions was to replace the regexp matching with a
> > hash look-up:
> > https://www.ruby-forum.com/topic/87932#166516
> > 
> 
> huh, I suppose that's one way...not sure why a hash lookup would be
> faster than .include?, but ya, I'll consider that option as well.

I seem to remember that associative arrays are data structures which are
optimized for quick access (usually implemented through self-balancing
binary trees or hash tables): I hope Ruby makes no exception on this
regard...

> 
> > It seems to me that this could be done with package names in the
> > Packages class's initialize() method: this way the Ruby Regexp
> > hard-coded limitation could be worked around.
> > 
> > Ryan, what do you think?
> > 
> 
> I've already replied, tho you seem to have not seen this mail...

I think your message was reaching my mailbox, while I was composing and
sending mine!   ;-)

Bye.

-- 
 New location for my website! Update your bookmarks!
 http://www.inventati.org/frx
..................................................... Francesco Poli .
 GnuPG key fpr == C979 F34B 27CE 5CD8 DC12  31B5 78F4 279B DD6D FCF4

Attachment: pgpEdZ6Y2xHvc.pgp
Description: PGP signature

Reply via email to