Friday, March 22, 2019

Technical Overview of the CLR

Technical Overview of the CLR

On their article, "Technical Overview of the CLR", authors Erik Meiker and Jim Miller compare the Common Language Runtime functions and characteristics with the JVM. First they talk about what is an intermediate language and its motivations, among which they mention portability (so there are less translators), compactness (intermediate code is usually more compact than the original one), efficiency (better use of the environment), security (it's easier to constraint security), interoperability (fundamental for software resuability) and flexibility (typesafe metaprogramming concepts).

In general, they debate how each of these factors are managed differently in CLR and in JVM, and demonstrate how CLR in general is more efficient and better than the other one. For instance, JVM doesn't implement type-unsafe featuresm like pointers and unsafe type conversion, while CLR does implement it, as it works with primitive and composite types. In bit storage, JVM is limited to 32-bit wide memory allocation, which makes bigger types like long or long long to recquire more memory blocks in order to use them. In the other side, CLR implements overflow during operations on data types, which is pretty useful in arithmetic calculations and processes.

CLI does not limit the length of branches to 64K, which is a problem for compilers generating JVM byte code. It uses enums and structs, while JVM needs to transform them to classes and class-hierarchies. This is a big advantage as we know because data oriented models are usually faster and more efficient in memory. CLM supports tailcalls as well, which allow recursion functions and models to be implemented to strictly repetitive structured languages as Haskell and Mercury.
In conclusion, CLI is more powerful and JVM, and Microsoft along with the .NET Framework developers are constantly working on it to develop more complex functions and make it more compatible and flexible with other programming languages.

No comments:

Post a Comment

The Hitchhiker's Guide To The Galaxy

The Hitchhiker's Guide To The Galaxy Reading this comedy and science-fiction comedy from Douglas Adams was actually pretty funny and ...