|
|
Warp wrote:
> I have no idea about the principles used in C#, but if it's anything like
> Java, the biggest problem is not so much speed as memory usage.
It's a lot like Java, but not in that respect. C# has things called
"structures" which you can't inherit from, but are otherwise objects.
They're basically value semantics. It's part of the type rather than the
variable (unlike C++), but an integer takes the same number of bytes in
C# as in C++. I.e., you can make a struct that takes 12 bytes of
storage, create an array of 10 of them, and it'll take 120 bytes of storage.
C#'s VM is also more targetted at JIT compilation. For example, at any
given point in the VM bytecode, no matter how you get there, the stack
has to have the same types on the stack. So in theory, if you had a
bunch of registers, you could assign anything that was put onto the
stack into a register instead. Just as one of many examples.
> I actually find it a bit worrying that it seems that no programming
> language introduced in the last 20 years which has got some popularity
> seems to offer any tools *whatsoever* to create memory-efficient programs
We already have those languages. Anyway, you're missing Ada. :-)
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
|