Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: Passing a Method Name to a Method, Redux Date: Thu, 23 Jun 2011 17:24:43 -0700 Organization: A noiseless patient Spider Lines: 17 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 24 Jun 2011 00:24:47 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="20GYBuezvHpp83lA3Rh62Q"; logging-data="14728"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18gg4qQ05oicJNtm/gx78CnTJfG8qDY+10=" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 In-Reply-To: Cancel-Lock: sha1:1auqj97dg9lI33iKYozMq38ohgo= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5616 On 6/23/2011 4:03 PM, Gene Wirchenko wrote: > > So how would you have written this benchmark? Um, realistically? Is this really what you want to do? static boolean TreesetSearch( char CurrChar ) { return IdentCharsSet.contains( CurrChar ); } All of the identifiers in your "language" are single characters? I would have used actual strings, preferably from existing code so you could test performance. Although I appreciate you making a self-contained example for us'm here on usenet.