Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: blmblm@myrealbox.com Newsgroups: comp.lang.java.programmer Subject: Re: StringBuilder Difficulties Date: 6 Jul 2011 16:55:41 GMT Organization: None Lines: 73 Message-ID: <97jicdFr6pU1@mid.individual.net> References: <0uk317l9064bd4uaa8m8tckpvks41d7jti@4ax.com> <97h5rqFhaeU2@mid.individual.net> <68v61753v8gru9ugkpjmllusua9nvei9si@4ax.com> X-Trace: individual.net wQ0ewy4AbiYbnBvdKZ4KVQ80zSUwmpYSsRY5X8cKuFktTkyUff X-Orig-Path: not-for-mail Cancel-Lock: sha1:L/kwl9xeMZIuWWSLVrZKm1jpRYg= X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5909 In article <68v61753v8gru9ugkpjmllusua9nvei9si@4ax.com>, Gene Wirchenko wrote: > On 5 Jul 2011 19:09:46 GMT, blmblm@myrealbox.com > wrote: > > >In article <0uk317l9064bd4uaa8m8tckpvks41d7jti@4ax.com>, > >Gene Wirchenko wrote: > >> On 2 Jul 2011 18:33:52 GMT, blmblm@myrealbox.com > >> wrote: > >> > >> >In article , > >> >Gene Wirchenko wrote: > >> > >> [snip] > >> > >> >> Oh, I asked about that. One apparently can not pass a function > >> >> pointer parameter as in C. The ways that were posted involved lookup > >> >> every time AFIACS and I judged that it might swamp what I was > >> >> measuring (checking if a character were in a set). So, to my chagrin, > >> >> I had to go with cut-and-paste. > >> > > >> >Without experimenting to find out, of course .... > >> > >> You are putting the cart before the horse. > >> > >> THE WHOLE POINT of this exercise was experimentation to test the > >> speed of the lookup. Until I got the code I was asking about running, > >> of course, I would not know. > > >Maybe I misunderstood what you meant by "lookup" above -- > >I understood you to be referring to whatever has to be done > >to find the method to be called, as opposed to looking up > >individual characters in a list/set. As far as I can tell, > > It was the latter. Well, why didn't you *say* so .... , sort of a :-) > >your benchmark concerns different approaches to the latter, > >but assumes that looking up the method (i.e., using the Java > >substitute for function pointers) will somehow skew the results > >to the point where it shouldn't/can't be used. (You may actually > >be right about that, much as it pains me to say so, because all > >that duplicate code is, in my opinion and possibly yours as well, > >both aesthetically displeasing and a source of potential trouble.) > > Well, I only need one. That code will get tossed shortly. Yes. But you did ask .... [snip] > >> My phrase "not so much help" does not refer to this newsgroup. > >> You can find texts and Websites on starting with Java. There is also > >> advanced material. In the middle is a sour spot. I am at the low end > >> of that sour spot. > > > >Ah. Interesting. I don't seem to have a clear memory of how I got > >from the beginning level to wherever I am now (intermediate?). I do > >remember, though, learning quite a bit from following semi-random > >discussions in this newsgroup. But that was, hm, a decade or so ago, > >and it's not clear it would still work. > > In my experience, it is a common pattern. After the beginner > level, there are few tutorials and yet, one does not know enough to > easily blow away the difficulties. Maybe you could start a new thread asking for suggestions on what to read -- I don't have any myself, but someone probably does. -- B. L. Massingill ObDisclaimer: I don't speak for my employers; they return the favor.