Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Gene Wirchenko Newsgroups: comp.lang.java.programmer Subject: Re: Passing a Method Name to a Method, Redux Date: Mon, 27 Jun 2011 13:53:12 -0700 Organization: A noiseless patient Spider Lines: 43 Message-ID: <0eqh071t45p7582aqk4qqdu59eplcmft93@4ax.com> References: <1lu707p0cpr9vhrpv51d7hmst6bt1qdbcv@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="7Qrvczazr82YckO5XW8Vtw"; logging-data="21952"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xtFoo/Ww7bnK5OieMnUcmCe3rJ9FsAr4=" X-Newsreader: Forte Agent 4.2/32.1118 Cancel-Lock: sha1:1bIn3TuFDbSaEd4Cld7vx2R+Xqo= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5713 On Sun, 26 Jun 2011 23:33:44 -0700, markspace <-@.> wrote: >On 6/26/2011 8:39 PM, Gene Wirchenko wrote: > >> You are misunderstanding. The test code that I am referring to >> is proof-of-concept code to test ideas, *not* my test cases. > >I don't see what you are doing then. Is the code you showed us not your >"test/proof of concept?" It is. >First, a proof of concept is a little silly for a parser. Of course >it's feasible. And then you are running timing test on it. Shouldn't >you be doing time tests on something you intend to throw away? Profile >the real code! I wanted to know which way to jump on character identification. I figured that squential would be bad though it is not as bad as I thought. I did not know which of a binary search on a String or a Treeset search would be faster. That was why I wrote the test. >You seem to be making a lot of extra work for yourself, or at least >confusing the heck out of us. I am an experienced programmer, but I am not so experienced with Java. I am trying to remedy the latter. On the confusion, I see that a number of people have micro-optimised for my code. I am looking at a bigger picture. >> But I do not want to do that. I am writing a preprocessor to >> process files like: > >You should be using input like what you showed to test then. The test >code you showed us won't parse this correctly. Of course not. The test code is just for dealing with identifiers, and it is a simplified version to boot. Sincerely, Gene Wirchenko