CLR vs Core CLR
What is CoreCLR
The CoreCLR provides many similar functionalities as the CLR, but it is specifically designed for the cross-platform nature of .NET Core.
General CLR feature
includes features like Just-In-Time (JIT) compilation, garbage collection, exception handling, and security, which are essential for executing .NET Core applications.
Smaller FootPrint
CoreCLR has a smaller footprint compared to the full CLR in the .NET Framework, as .NET Core is optimized for lightweight and high-performance scenarios
AOD (Ahead Of Time Compilation support)
CoreCLR supports ahead-of-time (AOT) compilation, which allows the Intermediate Language (IL) code to be precompiled into machine code, reducing startup times and enabling deployment scenarios without the need for a JIT compiler.
BCL/FCL vs CoreFX
BCL/FCL- Used in .Net Framework
CoreFX- Used in .Net Core
- CoreFx – Its like BCL, used for new .Net Core.
- CoreFX is the foundational library used by .NET Core. It provides a set of core functionalities and types that are used to build applications on the .NET Core platform.
- CoreFX includes various components like collections, file I/O, networking, cryptography, and more. These components are designed to be cross-platform and optimized for performance.
- With CoreFX, developers can build applications that are independent of the underlying operating system and can run on multiple platforms without requiring modification.
- CoreFX provides a similar set of core functionalities
- designed specifically for the cross-platform and modular nature of .NET Core.
- designed specifically for the cross-platform and modular nature of .NET Core.
- Some types and functionalities in the .NET Framework may have been redesigned or optimized in CoreFX to better align with the goals of .NET Core.
Roslyn Compiler (.net core) vs Traditional .Net Compiler
- A New .Net Core compiler more efficiently works with .Net Core.
- Roslyn is an open-source .NET Compiler Platform. It provides a set of compilers and APIs for building applications that work with source code. Roslyn includes both a C# compiler and a VB .NET compiler.
- Source Code Analysis: Roslyn allows deep analysis and understanding of source code, going beyond simple compilation.
- Rich API: Roslyn exposes a rich set of APIs that enable developers to programmatically analyze, manipulate, and generate code.
- Code Refactoring: It supports advanced code refactoring, allowing automated code modifications while maintaining correctness.
- IDE Integration: Roslyn is deeply integrated with development environments like Visual Studio, providing features like code completion, real-time error checking, and code diagnostics.
- Custom Tooling: Developers can leverage Roslyn APIs to build custom tools, code analyzers, and code generators.
- Open Source: Roslyn is an open-source project, enabling community contributions and continuous improvement.
- Language Services: Roslyn provides language-specific services, such as syntax trees, semantic analysis, symbol resolution, and code generation.
- Compiler as a Service (CaaS): Roslyn introduces the concept of Compiler as a Service, allowing developers to interact with the compiler at runtime.
Code Execution: CLR vs Core CLR
Code Execution difference in .Net Core and .Net Framework
.NET Framework: The .NET Framework is a full-featured framework that relies on the Common Language Runtime (CLR) to execute code. It includes a Just-In-Time (JIT) compiler that converts Intermediate Language (IL) code into machine code at runtime. The compiled code is then executed by the CLR.
.NET Core: .NET Core, on the other hand, uses a different approach for code execution. It employs the .NET Core Runtime (CoreCLR), which is a modular and cross-platform runtime. The CoreCLR includes a Just-In-Time compiler and supports ahead-of-time (AOT) compilation, where the IL code can be compiled into machine code before execution.
0 Comments