From: Rick Bradley Date: 2002-05-07T14:09:20+09:00 Subject: Re: require and case * Rich Kilmer (rich@infoether.com) [020507 00:04]: > I think that since the SHA-1 digest extension is included with ruby, > transitioning this code into the core to distinguish loaded files is > appropriate. It would internally store a hash of every loaded file at > 20 bytes apiece. Like Jim said, this would prevent the same file from > being loaded from two different directories. I don't think this would > add significant overhead (but I have not benchmarked it ;-) What is the problem being solved again? Is solving that problem worth turning an fstat()+fopen()+read()+fclose() into twice that plus SHA computation over every included file, plus a hash comparison and the overhead of maintaining an extra data structure (minus the ability to optimize with a cache)? Couple that with a potential race condition and I don't see what is gained. Rick -- http://www.rickbradley.com MUPRN: 828 (79 F) | the mythical wall random email haiku | of hoodoo). Ah. I guess the | hoodoo will come down.