Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Recommendations for Lightweight Threading?

Reply
Thread Tools

Re: Recommendations for Lightweight Threading?

 
 
Andreas Leitgeb
Guest
Posts: n/a
 
      06-26-2012
Lew <(E-Mail Removed)> wrote:
> Andreas Leitgeb wrote:
>> PS: I once had a task where some explicit System.gc() really helped.

> Presumably because the combination of code idioms and GC strategies
> wasn't optimized.


Genetic algorithm surely means something to you.
High and low tide, too, most likely.

In order to push the envelope just slightly, I had set heap size
to a bit more than physical memory size (to not have the program
bomb out for the rare high peaks) but otherwise make sure that
memory consumption stays well below the maximum most of the time.
Doing System.gc() on the low-tide-points just simply did help
achieve that goal. Other tricks may as well have existed,
they just didn't occur to me.

>> I don't know why it is so vaguely defined ("suggests", rather
>> than "requests" a best effort...), but it did appear to work
>> well, anyway.

> It appeared to work because you used a JVM implementation that
> honored it and you didn't run it with the switch that ignores those calls.
> Had either of those conditions not pertained, youd've had to actually fix
> the problem.


Indeed, like unsetting that (mindless) switch or changing to a
JVM-implementation that does honor the "suggestions"

PS: is "youd've" any common? It was easy to understand, but I'd never
before seen it written that way. Most of Google's first-page hits
seem to be discussions about how legal something like "you'd've"
would be. Only hit for "youd've" is in a youtube-video title.

 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      06-26-2012
Andreas Leitgeb wrote:
> PS: is "youd've" any common? It was easy to understand, but I'd never
> before seen it written that way. Most of Google's first-page hits
> seem to be discussions about how legal something like "you'd've"
> would be. Only hit for "youd've" is in a youtube-video title.


No, I accidentally didn't type the first apostrophe. It was a simple typo.

--
Lew
 
Reply With Quote
 
 
 
 
Andreas Leitgeb
Guest
Posts: n/a
 
      06-26-2012
Eric Sosman <(E-Mail Removed)> wrote:
> On 6/26/2012 12:26 PM, Andreas Leitgeb wrote:
>> Oh, seems I got the motivation wrong, then. If that was your point,
>> then obviously my essay didn't address that. My motivation was having
>> some large objects, whose memory could be explicitly freed, as soon as
>> the memory was no longer needed in the program.

> And my question, still, is "Why?"


Why do some people prefer cars with manual gear shift?
Maybe a (sub)conscious distrust in complicated technology...

 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      06-27-2012
Andreas Leitgeb wrote:
> Eric Sosman wrote:
>> Andreas Leitgeb wrote:
>>> Oh, seems I got the motivation wrong, then. If that was your point,
>>> then obviously my essay didn't address that. My motivation was having
>>> some large objects, whose memory could be explicitly freed, as soon as
>>> the memory was no longer needed in the program.

>> And my question, still, is "Why?"

>
> Why do some people prefer cars with manual gear shift?
> Maybe a (sub)conscious distrust in complicated technology...


Nope.

My car was $800.00 less expensive with a manual transmission than with
an automatic transmission. Manual gets better fuel economy. It gives better
control over the vehicle, especially in inclement weather. You can drop to
a lower gear and accelerate to pass more readily.

Subconscious distrust of complicated technology, indeed! Sniff! It's a
rational economic decision for those of us skilled enough to drive a manual
transmission.

--
Lew
 
Reply With Quote
 
Highway to Hell
Guest
Posts: n/a
 
      06-27-2012
On 26/06/2012 9:20 PM, Lew wrote:
> Nope.
>
> My car was $800.00 less expensive with a manual transmission than with
> an automatic transmission. Manual gets better fuel economy. It gives better
> control over the vehicle, especially in inclement weather. You can drop to
> a lower gear and accelerate to pass more readily.
>
> Subconscious distrust of complicated technology, indeed! Sniff! It's a
> rational economic decision for those of us skilled enough to drive a manual
> transmission.


Why am I not surprised that you'd not only have one, but be snobbish
about it?


 
Reply With Quote
 
glen herrmannsfeldt
Guest
Posts: n/a
 
      06-27-2012
Lew <(E-Mail Removed)> wrote:

(snip)
> My car was $800.00 less expensive with a manual transmission than with
> an automatic transmission. Manual gets better fuel economy. It gives better
> control over the vehicle, especially in inclement weather. You can drop to
> a lower gear and accelerate to pass more readily.


A little off topic, but...

Rumors are that automatics are now good enough to, in most cases,
get as good or better fuel economy. The computer is better at
figuring out what gear to be in and when than most, if not all,
drivers.

I am not so sure about the inclement weather or passing.
I probably believe that with enough practice you do better,
but without, which is most people, worse. (Passing is almost
a lost art with the number of four lane or more freeways.)

If you don't have enough practice, having to shift while
passing can be distracting from watching for cars coming
the other way.

-- glen
 
Reply With Quote
 
Gene Wirchenko
Guest
Posts: n/a
 
      06-27-2012
On Tue, 26 Jun 2012 21:52:30 -0400, Highway to Hell
<(E-Mail Removed)> wrote:

>On 26/06/2012 9:20 PM, Lew wrote:
>> Nope.
>>
>> My car was $800.00 less expensive with a manual transmission than with
>> an automatic transmission. Manual gets better fuel economy. It gives better
>> control over the vehicle, especially in inclement weather. You can drop to
>> a lower gear and accelerate to pass more readily.
>>
>> Subconscious distrust of complicated technology, indeed! Sniff! It's a
>> rational economic decision for those of us skilled enough to drive a manual
>> transmission.

>
>Why am I not surprised that you'd not only have one, but be snobbish
>about it?


Hardly snobbish. He gave good reasons and did not lord them over
us.

Sincerely,

Gene Wirchenko
 
Reply With Quote
 
Highway to Hell
Guest
Posts: n/a
 
      06-27-2012
On 26/06/2012 11:01 PM, Gene Wirchenko wrote:
> On Tue, 26 Jun 2012 21:52:30 -0400, Highway to Hell
> <(E-Mail Removed)> wrote:
>
>> On 26/06/2012 9:20 PM, Lew wrote:
>>> Nope.
>>>
>>> My car was $800.00 less expensive with a manual transmission than with
>>> an automatic transmission. Manual gets better fuel economy. It gives better
>>> control over the vehicle, especially in inclement weather. You can drop to
>>> a lower gear and accelerate to pass more readily.
>>>
>>> Subconscious distrust of complicated technology, indeed! Sniff! It's a
>>> rational economic decision for those of us skilled enough to drive a manual
>>> transmission.

>>
>> Why am I not surprised that you'd not only have one, but be snobbish
>> about it?

>
> Hardly snobbish.


I beg your *freaking* pardon? "Sniff! It's a rational blah blah for
those of us skilled enough blah blah" is about as
intellectually-snobbish as it gets. He clearly looks down on everyone
who chooses differently than him, in that and several other arenas.
 
Reply With Quote
 
Gene Wirchenko
Guest
Posts: n/a
 
      06-27-2012
On Tue, 26 Jun 2012 23:23:20 -0400, Highway to Hell
<(E-Mail Removed)> wrote:

>On 26/06/2012 11:01 PM, Gene Wirchenko wrote:
>> On Tue, 26 Jun 2012 21:52:30 -0400, Highway to Hell
>> <(E-Mail Removed)> wrote:
>>
>>> On 26/06/2012 9:20 PM, Lew wrote:
>>>> Nope.
>>>>
>>>> My car was $800.00 less expensive with a manual transmission than with
>>>> an automatic transmission. Manual gets better fuel economy. It gives better
>>>> control over the vehicle, especially in inclement weather. You can drop to
>>>> a lower gear and accelerate to pass more readily.
>>>>
>>>> Subconscious distrust of complicated technology, indeed! Sniff! It's a
>>>> rational economic decision for those of us skilled enough to drive a manual
>>>> transmission.
>>>
>>> Why am I not surprised that you'd not only have one, but be snobbish
>>> about it?

>>
>> Hardly snobbish.

>
>I beg your *freaking* pardon? "Sniff! It's a rational blah blah for
>those of us skilled enough blah blah" is about as
>intellectually-snobbish as it gets. He clearly looks down on everyone


It is a tool that he says he knows how to use.

>who chooses differently than him, in that and several other arenas.


It is a rational choice if you know how to use a manual
transmission.

Sincerely,

Gene Wirchenko
 
Reply With Quote
 
Andreas Leitgeb
Guest
Posts: n/a
 
      06-27-2012
Andreas Leitgeb <(E-Mail Removed)> wrote:
> Eric Sosman <(E-Mail Removed)> wrote:
>> On 6/26/2012 12:26 PM, Andreas Leitgeb wrote:
>>> Oh, seems I got the motivation wrong, then. If that was your point,
>>> then obviously my essay didn't address that. My motivation was having
>>> some large objects, whose memory could be explicitly freed, as soon as
>>> the memory was no longer needed in the program.

>> And my question, still, is "Why?"

> Why do some people prefer cars with manual gear shift?
> Maybe a (sub)conscious distrust in complicated technology...


Eric, did this and the discussion it triggered answer your question?

 
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
Re: Recommendations for Lightweight Threading? Kevin McMurtrie Java 3 06-19-2012 02:46 PM
Re: Recommendations for Lightweight Threading? markspace Java 4 06-16-2012 07:13 PM
Re: Recommendations for Lightweight Threading? Lew Java 0 06-15-2012 10:57 PM
When I spawn a lightweight process in ASP.NET Does it time out?? MS News ASP .Net 2 07-31-2003 11:53 PM
lightweight XSLT-based page flow: anyone thought of this? SUPER KOOL 223 Java 0 07-29-2003 08:01 PM



Advertisments