2 ms·
Ok, but: 1. GC is fast at the cost of using more memory, which it turn slows the entire app down. 2. JIT can do all those optimizations, but how many of them a
by blub 16y ago
Ok, but:
1. GC is fast at the cost of using more memory, which it turn slows the entire app down.
2. JIT can do all those optimizations, but how many of them are done in practice? How fast is the software compared to a binary compiled in C or C++?
3. Can be useful, but the only software that I've seen having trouble with startup times in the first place is written in .NET and Java :)
I guess that what I'm getting at is that C++ code is still faster than e.g .NET code even if C# has GC and JIT. In the end that's all that matter, not whether you can do optimization X.
- barrkel 16y ago.NET code is C++ code. The CLR is written in C++. In many ways this kind of argument is pointless, because it's really about a way of creating a piece of software, than particular to any one language. But some languages make life really hard here - in C++, you need to build a runtime. I'll assert that memory is not normally a constraint in most situations that need to scale (i.e. not constrained clients), these days. (Though I will say I have noticed that Firefox 4 is significantly slower than FF 3 when switching tabs, and I believe it's because of memory reduction optimizations they've put in because of everybody moaning about bloat. I'd prefer it use more memory and less CPU.) JIT optimizations like PICs? For over 20 years. The benefits are magnified in languages that make many operations virtual, so you see it in things like Smalltalk (very long time), Javascript (Chrome's V8) and Java JVMs (methods virtual by default so it's a win). Re slow startup - you're deluding yourself if you think there isn't much software that doesn't have startup time issues. I need only restart any machine I have to know how slow initialization is; with HDD transfer rates in excess of 100MB/sec, there's no good reason for it to take more than 10 seconds or so when no hardware has changed. You're simply not aware of how much faster things could be if startup were faster because you're used to how slow everything is. You just know you can't e.g. fork utility X more than 200 times a second in a script, but don't realize it might be 10 or 100 times faster with a different approach.