Originally posted by DanLamb
View Post
Originally posted by DanLamb
View Post
- smallest object: 16 bytes
- (empty) array of bytes: 24 bytes
- class A {
byte x;
}
class B extends A {
byte y;
}
new A(): 24 bytes, new B(): 32 bytes
-
class C {
Object obj = new Object();
}
new C() = 40 bytes
- Guava MapMaker.makeMap() takes 2272 bytes!
MapMaker.concurrencyLevel(1).makeMap() - 352 bytes
- Corba like Thrift can also be heavy (Thrift is a Twitter project): "It adds between 52 and 72 bytes of overhead per object."
So, what remained for me to "prove" are the following:
- Mono is not just a poor's man CLR (or .Net). Because performance wise (as was quoted) gives the same optimizations (given you pick LLVM which is not default) as a C++ runtime
- C# is not MS centric (it runs just well on Mono and with not impaired functionality)
- C# it makes sense on some platforms which are not Windows (like Linux, or iOS or Android) maybe even more than Java. The reason: at the end is created a native binary that is executed so it can run faster than let's say... Java on some devices (like Android and/or iOS). I know about RoboVM which is pre-alpha (like my tool too) and it can compile some Java apps on iOS
What about C# vs Scala. I don't know. I cannot comment (too much), because as much as you say, it looks to me that Scala has some ups and downs. Scala looks to me a more OOP that tries to describe as much as possible functional features, when C# added them later (via Linq). Maybe is not a clean syntax, but feature wise on practical side it looks that in some parts C# is clearly superior:
- PInvoke and native platform integration working with any OS (also to falsify your statement that C# is not platform agnostic)
- dynamic object: you can do dynamic programming. The syntax is worse than Mirah, or IronRuby or IronPython, of course, but you can do it fairly natural and the generated code is fast too.
- async/await is more than an actors or task based programming, and is supported on Mono (which is the topic of this article), not because it offers something more (which it does), but because the whole states are written by the compiler. This is why is so good experience running Windows Phones or modern WPF applications
Leave a comment: