Board index » delphi » Re: Question about FastMM

Re: Question about FastMM


2005-07-04 08:23:36 AM
delphi49
Quote
There might be a few odd exceptions here and there, but generally
speaking, no, I have seen no evidence at all that most single-threaded
apps are going to see an increase in speed from replacing the stock
memory manager. As others have pointed out, unless your app is making
heavy duty use of the memory manager, it is unlikely that even if you
find one that works better than the stock one that it will make much
difference in performance.
Even if speed is not improved, fragmentation can be minimized with a replacement
memory manager.
Brian Moelk
XXXX@XXXXX.COM
www.brainendeavor.com
 
 

Re: Question about FastMM

RandomAccess writes:
Quote
I think this is a terrific idea.
glad you like it. I see Dave White also touched on some of the reasons
why automatic selection of an MM would be nice.
--
John Kaster blogs.borland.com/johnk
Features and bugs: qc.borland.com
Get source: cc.borland.com
If it is not here, it is not happening: ec.borland.com
 

Re: Question about FastMM

Quote
Most programmers don't write multithreaded applications, they don't
even know how they could do that, or if any of the DLLs they use are
multithreaded, and they don't give a [you know what]. Most programmers
don't read doc. You can argue that it is their problem then, but that
does not help.
If a programmer doesn't know anything about any of the factors that help
them choose a memory manager, then I doubt they will be looking at optimizing
their performance. If they want to improve their performance, then they
will surely have to learn about multi-threading techniques, etc. (especially
with the movement to dual core procs in the future).
So, yes I'd argue that it is their problem.
Quote
If Delphi does not work as expected, they will moan and
groan and eventually take another programming package.
Performance isn't usually under the category of "work as expected"; this
is usually only in cases where the performance is really horrid. Besides,
I suspect that Delphi Win32 even with a naive memory manager implementation
performs reasonably well against its virtual machine counterparts: Java and
.NET.
Therefore, an ignorant programmer may groan when they don't explicitly pick
the "right" memory manager, but IMO, the experienced programmer will rightfully
groan if Delphi automatically picks the "wrong" memory manager.
Brian Moelk
XXXX@XXXXX.COM
www.brainendeavor.com
 

Re: Question about FastMM

Quote
>But RecyclerMM does not pass our testing.
>
>FastMM4 passes all tests.
>
If I have read the basm newsgroup correctly, NexusMM doesn't pass them
all either.
I think this brings up a good point about what those tests actually mean?
Certainly RecyclerMM and NexusMM both "work" in the sense they allocate/deallocate
memory; real-world applications use them and function great.
It would be useful to see exactly why those tests show that FastMM is a better
or safer MM than those that do not pass those tests; and ultimately if that
makes any difference whatsoever.
[snip]
Quote
Just to clarify, given the tendency of many here to (deliberately?)
misattribute malicious motives,
You're a bit paranerd.
Quote
I think the FastCode project is
superb. It is great that so many highly talented individuals are
devoting time to things that will and already have benefited all the
rest of us.
Agreed.
Quote
But I think much more skepticism needs to be applied to
the testing and benchmarking.
Agreed.
Brian Moelk
XXXX@XXXXX.COM
www.brainendeavor.com
 

Re: Question about FastMM

Brian Moelk <XXXX@XXXXX.COM>writes
<XXXX@XXXXX.COM>
Quote

You're a bit paranerd.
Technically, since that probably means "beyond the nerd", I suspect you are
quite correct. I have given in to my nerd status long ago. <g>
Quote
Agreed.

<snip>

Agreed.
Who are you and what have you done with Brian Moelk? <g>
--
Everything in this post is mere opinion.
It might be very well formed opinion based
on an uncanny grasp of the facts, but it
remains opinion nevertheless. It may be,
and in fact like most attempts at human
knowledge probably is, quite inaccurate and
incorrect. There is a chance of side
effects, such as misinterpretation,
misrepresentation, and miscommunication.
The opinions expressed in this post may
deviate significantly from your own,
causing you varying degrees of distress.
Some reactions may be severe. Relax, this
is normal, and not a sign that you need to
see your doctor. In the event that a
reaction lasts more than four hours,
consult your therapist.
Posted with Reader3000-BETA 0.9.4.930
 

Re: Question about FastMM

Brian Moelk <XXXX@XXXXX.COM>writes
<XXXX@XXXXX.COM>
Quote
Even if speed is not improved, fragmentation can be minimized with a replacement
memory manager.
Indeed, and that can have benefits that far exceed any perceived increase in
speed too, depending on the app and the end user requirements.
--
Everything in this post is mere opinion.
It might be very well formed opinion based
on an uncanny grasp of the facts, but it
remains opinion nevertheless. It may be,
and in fact like most attempts at human
knowledge probably is, quite inaccurate and
incorrect. There is a chance of side
effects, such as misinterpretation,
misrepresentation, and miscommunication.
The opinions expressed in this post may
deviate significantly from your own,
causing you varying degrees of distress.
Some reactions may be severe. Relax, this
is normal, and not a sign that you need to
see your doctor. In the event that a
reaction lasts more than four hours,
consult your therapist.
Posted with Reader3000-BETA 0.9.4.930
 

Re: Question about FastMM

Brian Moelk <XXXX@XXXXX.COM>writes
<XXXX@XXXXX.COM>
Quote
If a programmer doesn't know anything about any of the factors that help
them choose a memory manager, then I doubt they will be looking at optimizing
their performance. If they want to improve their performance, then they
will surely have to learn about multi-threading techniques, etc. (especially
with the movement to dual core procs in the future).

So, yes I'd argue that it is their problem.
Wow. We are in complete agreement.
I actually think it makes a lot more sense for programmers to spend time
acquiring good concurrent programming experience and techniques than .Net or
additional languages (though those are probably more fun for most
programmers). One of the Borlanders recently blogged about trying to make
multi-threading easier for Delphi users, I think it was Danny. that is a good
start, but I think the responsibility really lies on the programmer to learn
this stuff on his own. Writing a multi-threaded app is a lot like writing a
good scalable distributed app, the programmer really needs to think
differently about resource usage and locks and timing than if they were
simply writing a single-threaded app. The language and IDE can not really do
this for them.
--
Everything in this post is mere opinion.
It might be very well formed opinion based
on an uncanny grasp of the facts, but it
remains opinion nevertheless. It may be,
and in fact like most attempts at human
knowledge probably is, quite inaccurate and
incorrect. There is a chance of side
effects, such as misinterpretation,
misrepresentation, and miscommunication.
The opinions expressed in this post may
deviate significantly from your own,
causing you varying degrees of distress.
Some reactions may be severe. Relax, this
is normal, and not a sign that you need to
see your doctor. In the event that a
reaction lasts more than four hours,
consult your therapist.
Posted with Reader3000-BETA 0.9.4.930
 

Re: Question about FastMM

Brian Moelk writes:
...
Quote
If a programmer doesn't know anything about any of the factors that
help them choose a memory manager, then I doubt they will be looking at
optimizing their performance
...
So, yes I'd argue that it is their problem.
No problem with that. BUT: Delphi should always choose a mm as default that
works under every condition, so the problematic developer does not have a,
well, problem. it is great to choose between more MMs if you need more speed,
robustness etc, but you need a working default.
...
Quote
Therefore, an ignorant programmer may groan when they don't
explicitly pick the "right" memory manager, but IMO, the experienced
programmer will rightfully groan if Delphi automatically picks the
"wrong" memory manager.
Full ACK. Just don't let them use the "wrong" mm by default.
Rakf
 

Re: Question about FastMM

Captain Jake writes:
...
Quote
One of the Borlanders recently blogged about
trying to make multi-threading easier for Delphi users, I think it
was Danny. that is a good start, but I think the responsibility really
lies on the programmer to learn this stuff on his own.
You never read Joel on Software? If something is too complicated, then
(almost) nobody will use it. Make it easy to use, and many will see the
benefit. And that is so true. Why the heck should I define critical sections
etc if there is a so much more elegant solution? Chrome has a very elegant
way to define threads and critical sections. It is simple, it works, and it
does a job the compiler can do much better than I ever could.
Multithreading applications will become more and more state of the art. Make
it easy to build them.
Ralf
 

Re: Question about FastMM

Brian Moelk writes:
Quote
If a programmer doesn't know anything about any of the factors that
help them choose a memory manager, then I doubt they will be looking
at optimizing their performance.
I disagree. Lots of people choose to not write in ASM code but still
want a fast optimizing compiler. Why wouldn't they also want as fast an
app as possible?
--
John Kaster blogs.borland.com/johnk
Features and bugs: qc.borland.com
Get source: cc.borland.com
If it is not here, it is not happening: ec.borland.com
 

Re: Question about FastMM

Quote
I want to hear about real-world single-threaded apps that are significantly
sped up as a result of changing the MM. that is the only test that makes any
real difference to me.
The B&V includes replays of applications, and several of the benchmarks
functions are isolated snippets from actual applications.
As for other single-threaded applications, our industrial flow simulator
(palettes, packs, conveyors) can experience 5-50% speedups using an
alternate MM, and funnily enough, most of its allocations are at the
start *before* the calculations begins, gains are from better cache
coherency and from the string temporaries in the logging code (this
application is one of the reason why I started RecyclerMM a few years ago).
Eric
 

Re: Question about FastMM

Quote
Correction: The benchmarks Dennis has published show RecylerMM is faster
than FastMM *in that particular benchmark*. it is one of many benchmarks.
Yep, and FastMM has pretty much all that RecyclerMM had -- only misses
an 'Allocated' function, Pierre if you're listening... ;) -- and now has
quite a few features and optimization RecyclerMM never had.
There are some odd situations where latest RecyclerMM versions may come
ahead, but I reckon these are random occurences where f.i. RecyclerMM's
segregation comes closer to your data size than FastMM's, but since both
have a comparable amount of segregation, such an occurence is pure luck.
Eric
 

Re: Question about FastMM

Quote
[...] the bug *will* surface somehow sometime ...
...and more often than not, it will resurface very late and in a code or
situation that is completely unrelated to the code that is the root of
the error, making identification and debugging very hard
(non-reproducible error most of the time).
Eric
 

Re: Question about FastMM

Captain Jake writes:
Quote

Indeed, and that can have benefits that far exceed any perceived
increase in speed too, depending on the app and the end user
requirements.
Agreed. Some of my Service apps that run 24/7 needed a restart once,
maybe twice a month. After using a replacement MM, I have not had to do
that in over four months (and still counting...). Whether or not there
was any speed increase is not relevant, but if the app stops responding
due to memory fragmentation and out of memory errors, then one could
argue that the speed increase with the replacement MM is more than 100
fold...
 

Re: Question about FastMM

On Sun, 3 Jul 2005 18:30:06 -0500, "Captain Jake"
<jake[nospam]@jsnewsreader.com>writes:
Quote
Dennis <XXXX@XXXXX.COM>writes
<XXXX@XXXXX.COM>
>But RecyclerMM does not pass our testing.
>
>FastMM4 passes all tests.

If I have read the basm newsgroup correctly, NexusMM doesn't pass them all
either. But unsurprisingly FastMM4 does.
Jake, it seems you are under the miscomprehension that FastCode ==
FastMM4?
FastMM4 is *one* of the entries in the FastCode competition. RecyclerMM
is another (there are more). Nexus is only used as a reference, as being
one of the most known commercial MM:s.
For the moment, FastMM4 seems to lead the competition in most aspects
(but not all), but there's no guarantee it will be the final 'winner'.
It's even uncertain if it will be possible to select a 'winner'.
Depending on your program's needs, different MM:s may be the 'best'.
--
Anders Isaksson, Sweden
BlockCAD: web.telia.com/~u16122508/proglego.htm
Gallery: web.telia.com/~u16122508/gallery/index.htm