Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > StringBuilder Difficulties

Reply
Thread Tools

StringBuilder Difficulties

 
 
blmblm@myrealbox.com
Guest
Posts: n/a
 
      07-11-2011
In article <(E-Mail Removed)>,
Gene Wirchenko <(E-Mail Removed)> wrote:
> On 10 Jul 2011 19:08:40 GMT, http://www.velocityreviews.com/forums/(E-Mail Removed)
> <(E-Mail Removed)> wrote:
>
> >In article <(E-Mail Removed)>,
> >Gene Wirchenko <(E-Mail Removed)> wrote:

>
> [snip]
>
> >> Micro-optimisation is a nasty sin.

> >
> >Yeah, yeah .... I guess it just seems strange to me that you went to
> >all the trouble of writing code to benchmark various approaches --
> >suggesting that sometimes you *do* engage in micro-optimization --
> >but are resistant to trying one more approach that (in my tests
> >anyway) sometimes reduced execution time by almost 50%. Just sayin',
> >"whatever", .... ?

>
> It should be obvious to you why someone might do that.
>
> The part that I was benchmarking is critical to my program. It
> is repeatedly used since it is called for every non-newline character
> in a file. Initialising a set of characters does not happen nearly so
> often.


I know I don't always express myself with 100% clarity, but really,
I must be doing worse than usual here ....

I did not attempt to measure speed of initialization. That would
indeed be silly, and I don't understand why you would think ....
Well, be that as it may:

What I did was add to your benchmark code a test for LinkedHashSet,
identical to the one for TreeSet except for the type of set. When
I ran the resulting code, the output indicated that LinkedHashSet
was sufficiently faster than TreeSet for me to think you might
be interested. "Faster" here means "faster by your criterion as
I understand it". If you've made a decision and want to stop
dithering about whether you might have missed something someone
thinks might suit you better, okay, but .... Well, whatever.

By the way, I'm still mildly curious about why you decided, without
testing, that it would not be a good idea to follow the suggestions
you were given about avoiding all that tedious cut-and-paste. In

Message-ID: <(E-Mail Removed)>

you wrote

> 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.


It's interesting to me that you were able to reach this conclusion
(that using Java's alternative to function pointers *does* affect
benchmarking results) without doing any experiments -- I think
you're probably right, but I did some experiments before coming to
the same conclusion. "Whatever" again.

--
B. L. Massingill
ObDisclaimer: I don't speak for my employers; they return the favor.
 
Reply With Quote
 
 
 
 
Gene Wirchenko
Guest
Posts: n/a
 
      07-11-2011
On 11 Jul 2011 22:37:59 GMT, (E-Mail Removed)
<(E-Mail Removed)> wrote:

[snip]

>By the way, I'm still mildly curious about why you decided, without
>testing, that it would not be a good idea to follow the suggestions
>you were given about avoiding all that tedious cut-and-paste. In


Because it was a test program. I was not going to keep the code.
I have not thrown it out yet, but I could. Its job is done. The
"real" program only has one type of search, namely the one that I
found to be fastest (using TestSet).

[snip]

>It's interesting to me that you were able to reach this conclusion
>(that using Java's alternative to function pointers *does* affect
>benchmarking results) without doing any experiments -- I think
>you're probably right, but I did some experiments before coming to
>the same conclusion. "Whatever" again.


I had no easy way to test, was fairly confident of the result of
any such test, and it almost certainly did not matter. For the
search, none of those conditions were so.

At some point, one has to do something in order to end up having
done something.

Sincerely,

Gene Wirchenko
 
Reply With Quote
 
 
 
 
John Doe
Guest
Posts: n/a
 
      07-14-2011
supercalifragilisticexpialadiamaticonormalizeringe limatisticantatio
ns
<supercalifragilisticexpialadiamaticonormalizering elimatisticantati
ons averylongandannoyingdomainname.com> wrote:

> On 06/07/2011 10:51 PM, Steve Erwin wrote:
>> supercalifxxxxPaul Derbyshire - Pembroke Ontario CA

>
> What the **** is that?


Looks like an effort to shorten your obnoxious ID, asshole.

> Your newsreader broken, dipshit?
>
>> You make very very sure they bring you a very small dog, Paul
>> These balls of yours are not so huge a feed for a dachshund!

>
> Threats?


Are you new to UseNet, asshole?

> If I ever see Paul I'll make sure to let him know about them.
> Maybe you'll get lucky and he won't press charges.


Moron.

> At least now you seem to have gotten yourself your own handle,
> Mr. Erwin.
>
>> PML

>
> What the **** does that mean, Mr. Erwin?
>
>> You are a ****ed duck, Paul.

>
> Who is Paul and why are you obsessed with him, and why do you
> keep making these garbled, irrelevant followups to my posts?


Says an asshole who appears to be a nym-shifting troll.
--
















Probably a regular
nym-shifting
changed the follow-up groups
> Path: news.astraweb.com!border6.newsrouter.astraweb.com! feed.news.qwest.net!mpls-nntp-03.inet.qwest.net!195.114.241.41.MISMATCH!feeder.n ews-service.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED !not-for-mail
> From: supercalifragilisticexpialadiamaticonormalizeringe limatisticantations <supercalifragilisticexpialadiamaticonormalizering elimatisticantations averylongandannoyingdomainname.com>
> Newsgroups: comp.lang.java.programmer,comp.lang.lisp
> Subject: Re: StringBuilder Difficulties
> Followup-To: alt.dev.null
> Date: Wed, 06 Jul 2011 23:02:19 -0400
> Organization: supercalifragilisticexpialadiamaticonormalizeringe limatisticantations
> Lines: 22
> Message-ID: <iv37jt$bo1$3 speranza.aioe.org>
> References: <c4tk07dv1pq7u8k32qd6b7o1brc2rj8r30 4ax.com> <ual3175uj4e5jb7u44q8jn7soo7k532heq 4ax.com> <97h616FhaeU3 mid.individual.net> <jsu6171vmasu6jfvsbroa052n8u7ukarr3 4ax.com> <97hd9sFa1jU2 mid.individual.net> <iv2b1j$pf3$2 speranza.aioe.org> <iv2rr6$nqu$1 speranza.aioe.org> <iv2rd6$vqb$1 speranza.aioe.org> <iv33qt$55d$3 speranza.aioe.org> <it33qt$57d$3 speranza.aioe.org> <iv36hj$a33$3 speranza.aioe.org> <4e151f9e$0$3713$c3e8da3$12bcf670 news.astraweb.com>
> NNTP-Posting-Host: 9zMfMLj7Kt4oubZ/fw1Ukg.user.speranza.aioe.org
> Mime-Version: 1.0
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> X-Complaints-To: abuse aioe.org
> User-Agent: WinVN 0.99.12z (x86 32bit)
> X-Notice: Filtered by postfilter v. 0.8.2
>

 
Reply With Quote
 
John Doe
Guest
Posts: n/a
 
      07-14-2011
supercalifragilisticexpialadiamaticonormalizeringe limatisticantations <supercalifragilisticexpialadiamaticonormalizering elimatisticantations averylongandannoyingdomainname.com> wrote:

> On 06/07/2011 9:09 AM, tholen antispam.ham wrote:
>> markspace<- .> writes:
>>
>> 1> Newsgroups: comp.os.os2.advocacy
>>
>> 1> Possible, sure. Although the M.O. of "super" doesn't really match
>> 1> Paul's much, imo. Maybe we've trolled even if it's not Paul.
>>
>> The M.O. of "Stefan Robacki" matches those of Tim Harrison, Sulfide
>> Eater, Chad Carmichael, Extravagan, Meerkats, Purpleswandir, Heike
>> Svensson, Derek Yancey, Zxcvbnm, Greg Kelly, Willy Wonka, Nougat
>> Surprise, Mister Whiskers, John Harbl, Alice, Cthun, Boojum, Katie
>> Gerrolds, Julie Faramis, Henry Harrison, Nancy 4, and
>> supercalifragilisticexpialadiamaticonormalizeringe limatisticantations,
>> markspace.

>
> Hey, what?! Why am I in this list?


Maybe because you are a nym-shifting troll with an obnoxious ID.
--

















>> Why not just spot the NNTP-Posting-Host, markspace?

>
> Lots of people use AIOE, tholen. You're crazy if you think that will
> identify individual, separate posters. If AIOE put an IP address into
> that header, perhaps, but it doesn't.
>
>

Regular
nym-shifting
> Path: news.astraweb.com!border6.newsrouter.astraweb.com! news-xfer.nntp.sonic.net!feeds.phibee-telecom.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!gegeweb.org!aioe.org!.POSTED!not-for-mail
> From: supercalifragilisticexpialadiamaticonormalizeringe limatisticantations <supercalifragilisticexpialadiamaticonormalizering elimatisticantations averylongandannoyingdomainname.com>
> Newsgroups: comp.lang.java.programmer
> Subject: Re: StringBuilder Difficulties
> Date: Wed, 06 Jul 2011 22:40:05 -0400
> Organization: supercalifragilisticexpialadiamaticonormalizeringe limatisticantations
> Lines: 23
> Message-ID: <iv36a7$a33$1 speranza.aioe.org>
> References: <c4tk07dv1pq7u8k32qd6b7o1brc2rj8r30 4ax.com> <irln07dveti624e71v8viderf0hjtudue5 4ax.com> <9744m8FpnhU3 mid.individual.net> <6cqp07tiug2nu8u6ififvvek1694fkpfi1 4ax.com> <976q3jF3etU2 mid.individual.net> <e9ps07h56utkftkp8fcarm7uhkk5t999le 4ax.com> <978bv1FnqaU1 mid.individual.net> <gfk317di8imjcuvfgrn2mgtug1cne9m1m9 4ax.com> <97ejjfFrh1U1 mid.individual.net> <iuu9ka$o4p$1 speranza.aioe.org> <iuveal$r32$1 dont-email.me> <iuvk96$3bq$1 speranza.aioe.org> <iuvq0h$e95$1 dont-email.me> <iuv008$fdh$1 speranza.aioe.org> <iv0one$skq$1 dont-email.me> <953656b6-5cef-4ce9-ac42-b4c115f09e41 z7g2000prh.googlegroups.com>
> NNTP-Posting-Host: 9zMfMLj7Kt4oubZ/fw1Ukg.user.speranza.aioe.org
> Mime-Version: 1.0
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> X-Complaints-To: abuse aioe.org
> User-Agent: WinVN 0.99.12z (x86 32bit)
> X-Notice: Filtered by postfilter v. 0.8.2
>

 
Reply With Quote
 
supercalifragilisticexpialadiamaticonormalizeringelimatisticantations
Guest
Posts: n/a
 
      07-14-2011
On 14/07/2011 2:32 AM, John Doe wrote:
> supercalifragilisticexpialadiamaticonormalizeringe limatisticantatio
>> What the **** is that?

>
> Looks like an effort to shorten your obnoxious ID, asshole.


Who is "asshole", Doe? There is nobody in this newsgroup using that alias.

>> Threats?

>
> Are you new to UseNet, asshole?


Who is "asshole", Doe? There is nobody in this newsgroup using that alias.

>> If I ever see Paul I'll make sure to let him know about them.
>> Maybe you'll get lucky and he won't press charges.

>
> Moron.


Who is "Moron", Doe? There is nobody in this newsgroup using that alias.

>> Who is Paul and why are you obsessed with him, and why do you
>> keep making these garbled, irrelevant followups to my posts?

>
> Says an asshole who appears to be a nym-shifting troll.


What does your classic erroneous presupposition have to do with Java, Doe?
 
Reply With Quote
 
supercalifragilisticexpialadiamaticonormalizeringelimatisticantations
Guest
Posts: n/a
 
      07-14-2011
On 14/07/2011 2:50 AM, John Doe wrote:
> supercalifragilisticexpialadiamaticonormalizeringe limatisticantations
>> Hey, what?! Why am I in this list?

>
> Maybe because you are a nym-shifting troll with an obnoxious ID.


What does your classic erroneous presupposition have to do with Java, Doe?
 
Reply With Quote
 
Jane Doe
Guest
Posts: n/a
 
      07-14-2011
John Doe <(E-Mail Removed)>, wrote:

>>supercalifxxxxPaul Derbyshire - Pembroke Ontario CA wrote:

>
>> On 06/07/2011 10:51 PM, Steve Erwin wrote:
>>> supercalifxxxxPaul Derbyshire - Pembroke Ontario CA

>>
>> What the **** is that?

>
>Looks like an effort to shorten your obnoxious ID, asshole.


the worm hath shrunk and is now lost for words, in public.

>
>> Your newsreader broken, dipshit?
>>
>>> You make very very sure they bring you a very small dog, Paul
>>> These balls of yours are not so huge a feed for a dachshund!

>>
>> Threats?

>
>Are you new to UseNet, asshole?
>

with more than 4 kooksoots threatened by Derbyshire at netizens
I would say he is new at being run up the pole post being
caught "at it".

>> If I ever see Paul I'll make sure to let him know about them.
>> Maybe you'll get lucky and he won't press charges.

>
>Moron.
>

Mirror Man.
the witch in the fairytale has nothing on the
Derbyshire act.

>> At least now you seem to have gotten yourself your own handle,
>> Mr. Erwin.
>>
>>> PML

>>
>> What the **** does that mean, Mr. Erwin?
>>
>>> You are a ****ed duck, Paul.

>>
>> Who is Paul and why are you obsessed with him, and why do you
>> keep making these garbled, irrelevant followups to my posts?

>
>Says an asshole who appears to be a nym-shifting troll.
>


do not worry about any libel action being brought by the
Derbyshire asshole. no need to pull your words, Derbyshire IS
a nym shifting troll. and has been for quite some
time, as a matter of art.
elsewhere it is looking like he has set up his own
little flame war in a private place involving hundreds
of people. this because in his view Usenet is "too light".


we got a psychotic here in Derbyshire script.
hide the knives!
 
Reply With Quote
 
Jane Doe
Guest
Posts: n/a
 
      07-14-2011
supercalifxxxxPaul Derbyshire - Pembroke Ontario CA
of NNTP-Posting-Host: i/Qx8aG7GhfvVWTGQz7VLw.user.speranza.aioe.org
did make foam with:
>On 14/07/2011 2:50 AM, John Doe wrote:
>> supercalifragilisticexpialadiamaticonormalizeringe limatisticantations
>>> Hey, what?! Why am I in this list?

>>
>> Maybe because you are a nym-shifting troll with an obnoxious ID.

>
>What does your classic erroneous presupposition have to do with Java, Doe?


suffering from comprehension challenges much, idiot.

Java related, Derbyshire?

try on the fact you cannot code Derbyshire into an AIOE post
as you shot yourself big time in directing AIOE to provide a word ban for
Derbyshire.
yeh, that's right. it is news all over.
Derbyshire the lamer whined to AIOE and AIOE gave him what he
wanted and now Derbyshire is ****ed in using "reply-to" without
doing a whole heap of editing.
classic "usenet suicide" act you got there Derbyshire

hear this sucker. yall is ****ed with these Java groups.
credibility is zero with tracking easy on your posting tag for AIOE
and now Google. what yall gonna do Squirrel BOY.
hands over ears and stamp ya lil Derbyshire feet till the guys
in white coats rock up!

BWAaaAAAAAAAAAAAHhHAAAAAAAAAAAAAAAAAAAA
 
Reply With Quote
 
thoolen
Guest
Posts: n/a
 
      07-14-2011
On Jul 14, 10:07*am, Jane Doe <(E-Mail Removed)> wrote:
1> John Doe <(E-Mail Removed)>, wrote:
1> >>supercalifxxxxPaul Derbyshire - Pembroke Ontario CA *wrote:

John Doe didn't write that, Doe, yet you attributed it to him anyway.
Classic dishonesty on your part, Doe.

1> the worm hath shrunk and is now lost for words, in public.

Who is "the worm", Doe? There is nobody in this newsgroup using that
alias.

1> with more than 4 kooksoots threatened by Derbyshire at netizens
1> I would say he is new at being run up the pole post being
1> caught "at it".

Who is "Derbyshire", Doe? There is nobody in this newsgroup using that
alias.

1> Mirror Man.

Who is "Mirror Man", Doe? There is nobody in this newsgroup using that
alias.

1> the witch in the fairytale has nothing on the
1> Derbyshire act.

Who is "Derbyshire", Doe? There is nobody in this newsgroup using that
alias.

1> do not worry about any libel action being brought by the
1> Derbyshire asshole.

Who is "the Derbyshire asshole", Doe? There is nobody in this
newsgroup using that alias.

1> no need to pull your words, Derbyshire IS
1> a nym shifting troll. and has been for quite some
1> time, as a matter of art.

Who is "Derbyshire", Doe? There is nobody in this newsgroup using that
alias.

1> elsewhere it is looking like he has set up his own
1> little flame war in a private place involving hundreds
1> of people.

What does your classic inconsistency have to do with Java, Doe?

1> this because in his view Usenet is "too light".

What does your view of Usenet have to do with Java, Doe?

1> we got a psychotic here in Derbyshire script.

Who is "Derbyshire", Doe? There is nobody in this newsgroup using that
alias.

1> hide the knives!

What does your advice to John Doe have to do with Java, Doe?
 
Reply With Quote
 
thoolen
Guest
Posts: n/a
 
      07-14-2011
On Jul 14, 10:20*am, Jane Doe <(E-Mail Removed)> wrote:
2> Newsgroups: comp.lang.java.programmer,comp.lang.lisp,
2> comp.lang.java.help

2> supercalifxxxxPaul Derbyshire - Pembroke Ontario CA
2> of NNTP-Posting-Host: i/Qx8aG7GhfvVWTGQz7VLw.user.speranza.aioe.org
2> did make foam with:

Who is "supercalifxxxxPaul Derbyshire", Doe? There is nobody in this
newsgroup using that alias.

2> suffering from comprehension challenges much, idiot.

Who is "idiot", Doe? There is nobody in this newsgroup using that
alias.

2> Java related, Derbyshire?

Who is "Derbyshire", Doe? There is nobody in this newsgroup using that
alias.

2> try on the fact you cannot code Derbyshire into an AIOE post
2> as you shot yourself big time in directing AIOE to provide a word
ban for
2> Derbyshire.

What does your classic unsubstantiated and erroneous claim have to do
with Java, Doe?

2> yeh, that's right. it is news all over.

What does your classic ambiguity have to do with Java, Doe?

2> Derbyshire the lamer whined to AIOE and AIOE gave him what he
2> wanted and now Derbyshire is ****ed in using "reply-to" without
2> doing a whole heap of editing.

Who is "Derbyshire the lamer", Doe? There is nobody in this newsgroup
using that alias.

2> classic "usenet suicide" act you got *there Derbyshire

Who is "Derbyshire", Doe? There is nobody in this newsgroup using that
alias.

2> hear this sucker.

Who is "sucker", Doe? There is nobody in this newsgroup using that
alias.

2> yall is ****ed with these Java groups.

What does your classic unsubstantiated and erroneous claim have to do
with Java, Doe? There is a post from
supercalifragilisticexpialadiamaticonormalizeringe limatisticantations
dated just a couple of hours ago that is on topic and useful, Doe.

2> credibility is zero with tracking easy on your posting tag for AIOE
2> and now Google.

What does your net.stalking of an innocent and mistakenly-identified
man have to do with Java, Doe?

2> what yall gonna do Squirrel BOY.

Who is "Squirrel BOY", Doe? There is nobody in this newsgroup using
that alias.

2> hands over ears and stamp ya lil Derbyshire feet till the guys
2> in white coats rock up!

Who is "Derbyshire", Doe? There is nobody in this newsgroup using that
alias.

2> BWAaaAAAAAAAAAAAHhHAAAAAAAAAAAAAAAAAAAA

What does your maniacal laughter have to do with Java, madman?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
string vs stringbuilder H.G.Srivatsa ASP .Net 3 08-25-2005 01:55 PM
Double Quotes in a stringbuilder =?Utf-8?B?SnVzdGlu?= ASP .Net 2 03-18-2005 12:57 AM
Does a StringBuilder effect Viewstate variable size? darrel ASP .Net 2 01-28-2005 11:31 PM
How to reset a StringBuilder? ESPN Lover ASP .Net 2 10-14-2004 03:42 PM
no stringbuilder in C#2.0? =?Utf-8?B?SGFuZGk=?= ASP .Net 2 09-11-2004 08:27 AM



Advertisments