StringBuilder Difficulties

B

blmblm

[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: <[email protected]>

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

Gene Wirchenko

On 11 Jul 2011 22:37:59 GMT, (e-mail address removed)

[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
 
J

John Doe

supercalifragilisticexpialadiamaticonormalizeringelimatisticantatio
ns
<supercalifragilisticexpialadiamaticonormalizeringelimatisticantati
ons said:
What the **** is that?

Looks like an effort to shorten your obnoxious ID, asshole.
Your newsreader broken, dipshit?


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.


What the **** does that mean, Mr. Erwin?


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
 
J

John Doe

supercalifragilisticexpialadiamaticonormalizeringelimatisticantations said:
Hey, what?! Why am I in this list?

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

supercalifragilisticexpialadiamaticonormalizeringe

supercalifragilisticexpialadiamaticonormalizeringelimatisticantatio

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

Who is "asshole", Doe? There is nobody in this newsgroup using that alias.
Are you new to UseNet, asshole?

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

Who is "Moron", Doe? There is nobody in this newsgroup using that alias.
Says an asshole who appears to be a nym-shifting troll.

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

supercalifragilisticexpialadiamaticonormalizeringe

supercalifragilisticexpialadiamaticonormalizeringelimatisticantations

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

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

Jane Doe

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

the worm hath shrunk and is now lost for words, in public.
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".
Mirror Man.
the witch in the fairytale has nothing on the
Derbyshire act.
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!
 
J

Jane Doe

supercalifxxxxPaul Derbyshire - Pembroke Ontario CA
of NNTP-Posting-Host: i/Qx8aG7GhfvVWTGQz7VLw.user.speranza.aioe.org
did make foam with:
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 fucked in using "reply-to" without
doing a whole heap of editing.
classic "usenet suicide" act you got there Derbyshire

hear this sucker. yall is fucked 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
 
T

thoolen

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?
 
T

thoolen

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 fucked 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 fucked with these Java groups.

What does your classic unsubstantiated and erroneous claim have to do
with Java, Doe? There is a post from
supercalifragilisticexpialadiamaticonormalizeringelimatisticantations
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?
 
J

Jane Doe

(e-mail address removed) Derbyshire - Pembroke Ontario CA
hosted at --------->70.54.9.207
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.

YOU.
Derbyshire

Home of Derbyshire - Idiot House

IP address: 70.54.9.207
Reverse DNS: bas1-ottawa10-1177946575.dsl.bell.ca.
Reverse DNS authenticity: [Verified]

You shall not use or allow others to use the Service or your Device if such use is for,
or results in, any illegal, abusive, annoying or offensive activities, including making
available offensive content, the commission or encouragement of a criminal offence,
stalking, harassment, spamming, disrupting or interfering with the Internet, any
network, computers or other devices, transmission of a virus or other harmful
component, defamation, intellectual property infringement, or interference with
other clients' service;



Complaints to: 1 800 773-2121 Ontario
[free call]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top