Re:It’s Faster Because It’s C
by IgorPartola on Tuesday July 13, 2010 @08:49AM
(#1511140)
Faster is not always what we are after though. I recently wrote a piece of code to run in tightly constrained (but not embedded) environments, and C was the natural choice. The Python or PHP or JavaScript interpreter and VM just wouldn't fit in the RAM.
[ Parent
| on HN ]
Sometimes you don't want to suck up all of the RAM on a non-embedded machine, either. Also faster startup times and no collector pauses. A lot of times those are required.
collector pauses brings up some discussions I've had with some friends - in essence, it's not something you want your platform to do when you're programming something like a game where you're pushing 60 frames a second + audio.
If you don't know what to look for you could end up looking for a long time.
Yea, Strings in Java take up much more memory than one would expect.
Minimum String memory usage (bytes) = 8 * (int) ((((no chars) * 2) + 45) / 8)
http://www.javamex.com/tutorials/memory/string_memory_usage....
Objects in general also have significant overhead.