No alternative for F-spot?
No alternative for F-spot?
Posted Jul 2, 2009 11:43 UTC (Thu) by MathFox (guest, #6104)In reply to: No alternative for F-spot? by MisterIO
Parent article: Stallman warns about C# and Mono dependence
For me it is not a programming language issue, but a runtime resource usage issue.
Posted Jul 2, 2009 15:50 UTC (Thu)
by alankila (guest, #47141)
[Link] (14 responses)
This is important because every application has a distinct heap of memory that it uses for whatever purpose, but there is no possibility of sharing this area of memory because every application always starts from scratch.
Assuming there's any degree of accuracy on these numbers, Mono wins JVM by a factor of 2-3.
Posted Jul 2, 2009 18:32 UTC (Thu)
by ncm (guest, #165)
[Link] (12 responses)
It's pointless to compare a JVM's resource usage to that of the Mono runtime. Both are indefensibly awful. It's partly a consequence of a stupid runtime design -- why defer compilation to runtime, when you can compile directly to machine code once? But it's as largely attributable to unavoidable dependence on garbage collection, leading ineluctably to pervasive memory leaks. In other words, they don't bother compiling to machine code because it doesn't help much anyway.
Mono and Java defenders often point out that Python can be a thousand times slower than Mono or Java. That Python programs are often preferable to either, anyway, indicts both.
Posted Jul 2, 2009 20:46 UTC (Thu)
by nix (subscriber, #2304)
[Link]
Posted Jul 2, 2009 21:37 UTC (Thu)
by epa (subscriber, #39769)
[Link] (2 responses)
Posted Jul 3, 2009 5:04 UTC (Fri)
by ncm (guest, #165)
[Link]
Posted Jul 3, 2009 7:24 UTC (Fri)
by xoddam (subscriber, #2322)
[Link]
"Since the collector supplements the reference counting already used in Python, you can disable the collector if you are sure your program does not create reference cycles. Automatic collection can be disabled by calling gc.disable()."
Posted Jul 3, 2009 17:09 UTC (Fri)
by alankila (guest, #47141)
[Link] (7 responses)
Your concept of garbage collection and its "pervasive memory leaks" is bizarre. I don't even attempt to figure out what you can possibly mean by this.
Posted Jul 3, 2009 20:24 UTC (Fri)
by nix (subscriber, #2304)
[Link] (6 responses)
Firstly --- and this is more a problem with stupid programmers, but a
Secondly, GC can often ruin data locality, smashing the dcache badly.
Posted Jul 4, 2009 1:32 UTC (Sat)
by alankila (guest, #47141)
[Link] (5 responses)
I have actually seen this antipattern in my old working place: a web application that didn't quite work and they had to restart the program whenever customers reported that it was stuck again. The application was ported from Perl with people assuming similar semantics (predictable destructor calls at end of block), and none of the database handles were closed properly, leaving read locks behind.
The locality issue is harder to tackle in any meaningful way. In principle the GC could be informed about desired locality patterns by some kind of sampling algorithm that records recently used objects, and then moves them as close to each other as possible during the next major GC cycle. I don't think anyone does this in practice, though.
Still, VM people are fond to argue that having a VM abstraction allows doing just this kind of weird optimizing like moving objects around in memory in response to runtime demands. Perhaps JVM could beat C one day if all imaginable tricks were pulled...
Posted Jul 4, 2009 5:14 UTC (Sat)
by ncm (guest, #165)
[Link] (4 responses)
Posted Jul 4, 2009 7:41 UTC (Sat)
by njs (subscriber, #40338)
[Link] (3 responses)
That said, I agree it's annoying how popular the idea is that deferred GC is the *only* memory management technique one would ever need or want. Also, determinism is awesome. But OTOH, a lot of the programs being written in GC environments are ones where the authors would never get the memory management right anyway.
None of which has anything to do with Seattleites bearing gifts.
Posted Jul 4, 2009 7:43 UTC (Sat)
by njs (subscriber, #40338)
[Link] (2 responses)
Posted Jul 6, 2009 19:00 UTC (Mon)
by ncm (guest, #165)
[Link] (1 responses)
Posted Jul 8, 2009 6:19 UTC (Wed)
by deunan_knute (guest, #290)
[Link]
Posted Jul 9, 2009 8:24 UTC (Thu)
by ketilmalde (guest, #18719)
[Link]
The results are graphed here:
http://gmarceau.qc.ca/blog/2009/05/speed-size-and-dependa...
From this, the ideal seems to be OCaml, which is consistenly good both in code size and speed, but plain C seems to beat C# soundly.
No alternative for F-spot?
Question: Which is worse, Transformers 2 or Gigli?Resource hogs
Answer: Both.
Resource hogs
optimization opportunities given the code's *current* workload, which is
something a static in-advance compiler would have no hope of doing.
Resource hogs
Resource hogs
Python gc is avoidable
Resource hogs
Resource hogs
pervasive one --- programmers tend to think "ooh, GC, now I don't need to
worry about resource leaks". And then they go on and leak all sorts of
non-memory resources, many of which have memory tied to them.
(This is a major, perhaps *the* major, reason for the large slowdown in
GCC around version 3.0. Cache misses up the wazoo.)
Resource hogs
People have been talking about stuff like this for going on fifty years. If it worked, it would be everywhere by now. Various such tricks have been implemented here and there. The code washes away, every time, and takes the tricks with it. Nobody has ever implemented many of the tricks in one place. You never get real-time, incremental, compacting, generational, thread-safe, multi-CPU cache-efficient GC all in one place in a runtime you actually get to use. Many potentially helpful techniques are incompatible with calling essential C libraries, so they'll never show up in a JVM or CLI.
Resource hogs
I'm not sure what "cache-efficient" ends up meaning for a garbage collector (e.g., which is better -- mark-sweep with its big reads, or reference counting with its scattered writes?), but AFAICT pretty much all the rest of those are common in the Java world at this point. Many, many person-years have gone GC's in recent years. For instance, here's a paper on the latest (still beta?) Sun GC called G1.
Resource hogs
Resource hogs
Resource hogs
Resource hogs
Language shootout
