SlideShare a Scribd company logo
1 of 59
Mono And .NET PC54 	Miguel de Icaza 	VP Developer Platform 	Novell, Inc.
Introduction to Mono Mono’s Customizable CLR Mono’s C# Eval Assembly binary reshaping Turbo charging games and graphics Static Compilation Others Agenda
Mono 2.0Just released! An open source .NET implementation: A subset of .NET Sponsored by Novell ~120 non-affiliated contributors (1.2 -> 2.0) Direction driven by contributors
Our goal is to have a compatible runtime to the CLR ECMA specifications make it possible Develop, build, debug on Visual Studio or Unix Deploy on Linux, Mac OSX and embedded Compatibility
APIs Server Third Party Client Postgress, MySQL Sqlite, Oracle, Sybase ASP.NET Gtk# Windows.Forms Tao.Framework Apache and FastCGI Mono.Cairo Gdk# C5 System.Data SQL Server Cocoa# Pango# NDesk.DBus Infrastructure Mono.ZeroConf Mono.Nat Mono.Cecil Mono.Addins Mono.RelaxNG Java/IKVM Novell.Ldap Mono.Fuse Gecko# (Mozilla) Mono.Nat Mono.Torrent Mono.Upnp
We can offer a few bonuses Take .NET where no .NET has gone before Offering new forward-compatible features Support special scenarios Mono's CLI Implementation
We can offer a few bonuses Take .NET where no .NET has gone before Offering new forward-compatible features Support special scenarios Mono's CLI Implementation
CLRs For Everyone Microsoft has the CLR, CF and the CoreCLR CoreCLR is a small version of CLR CoreCLR used in Mesh and Silverlight Compact Framework used in XNA
CLRs For Everyone Microsoft has the CLR, CF and the CoreCLR CoreCLR is a small version of CLR CoreCLR used in Mesh and Silverlight Compact Framework used in XNA For everyone else, there is Mono
Mono AdaptabilityFrom full framework to tailored framework Full framework is 100 megs (uncompressed) Minimal setup is 2 megs (uncompressed) Modular runtime can be shrunk/grown:
The Evolution of a Compiler (or, C# 5 today)
Mono's C# 3.0 Compiler C# compiler written in C# Originally, a project to learn to write C# code
Mono's C# 3.0 Compiler C# compiler written in C# Originally, a project to learn to write C# code First bootstrap (2001) 17 seconds to bootstrap, 10,000 lines csc compiled it in a second
Mono's C# 3.0 Compiler C# compiler written in C# Originally, a project to learn to write C# code First bootstrap (2001) 17 seconds to bootstrap 10,000 lines csc compiled it in a second Speed is no longer a problem Today 82,000 lines in 2.2 seconds 1.6x slower than csc
Mono.CSharp.dll – Compiler Service Mono.CSharp.Evaluator Encapsulates the compiler in one class Provides C# Eval and C# Run: using System; using Mono.CSharp; class MyFirstCSharpInterpreter {     static void Main (string [] args)     {         object r = Evaluator.Evaluate (args [0]);         Console.WriteLine (r);     } }
Mono.CSharp – Applications Read-Eval-Print-Loop (repl) Script applications with C# Rapid prototyping in target language Automation Would be cool to have this on every app!
The csharp Command Python and Ruby have interactive shells Read-Eval-Print Loop Expressions and Statements: csharp> 1; 1; csharp> “Hello, World”.IndexOf (“,”); 5; csharp> 1 +       > 2; 3 csharp> var a = Console.ReadLine ();
LINQ From The Command Line $ csharp Mono C# Shell, type “help;” for help Enter statements below. csharp> using System.IO; csharp> var last_week = DateTime.Now – TimeSpan.FromDays (7); csharp> from f in Directory.GetFiles (“/etc”)       >   let fi = new FileInfo (f)       >   where fi.LastWriteTime < last_week       >   select f; { “/etc/adjtime”, “/etc/asound.state”,   “/etc/ld.so.cache”, “/etc/mtab”,    “/etc/printcap”, “/etc/resolv.conf” } csharp>
Interactive LINQ To XML  csharp> LoadLibrary (“System.Xml.Linq”); csharp> using System.Xml.Linq; csharp> var xml = new XElement("CompilerSources",      >   from f in Directory.GetFiles ("/cvs/mcs/mcs")      >   let fi = new FileInfo (f)      >   orderby fi.Length      >   select new XElement ("file",        >     new XAttribute ("name", f),        >     new XAttribute ("size", fi.Length)));csharp> xml;<CompilerSources>  <file name="/cvs/mcs/mcs/mcs.exe.config" size="395" />  <file name="/cvs/mcs/mcs/gmcs.exe.config" size="464" />  <file name="/cvs/mcs/mcs/OPTIMIZE" size="498" />  <file name="/cvs/mcs/mcs/lambda.todo" size="658" />  [...]</CompilerSources>
GUI ShellC# eval hosted in a GUI Replace base class, with GUI base class:
GUI ShellC# eval hosted in a GUI Replace base class, with GUI base class:
GUI Shell, Quick Plot Method Plot (Func<double,double>);
GUI Shell, Quick Plot Method Plot (Func<double,double>);
Reshaping The APITurning the compiler into a library Complete C# Compiler Mono.CSharp ,[object Object]
Minimal API,[object Object]
Uses Mono.Cecil
Reshapes  code
Desired API
Removes or hides
Minimal APIlink.xml
Mono Linker Use Cases Shrinking Assemblies Shipping only what is required Simplify deployment Create your own Compact Framework What you need from the superset .NET 3.5 to Silverlight We reshape our assemblies. Minimal hand-editing/tuning.
Beyond the CLR:  Innovating On ASolid FoundationVirtual machines are fascinating Great innovations are possible  Build on an existing large ecosystem Instrument, expand, innovate Special code generation
Beyond the CLR:  Innovating On ASolid FoundationVirtual machines are fascinating Great innovations are possible  Build on an existing large ecosystem Instrument, expand, innovate Special code generation VM potential limited by vendor realities Provider scarcity Shipping dates Staffing Product Management Feature prioritization
Injecting Code Into A Live ProcessThe Mono.Attach.VirtualMachine API On the root AppDomain, on a new thread
Injecting GUI Interactive C#Consoles for everyone!
Turbocharging Games Fast, Productive, Safe. Pick all three.
Game Software Components. Display Simulation Game Logic Support ,[object Object]
Shading
Scene
Animation
Geometry
GUI
Physics
Collision
Particles
Terrain
World rules
Enemy AI
User control
Camera
Behavior
Audio
Input
Networking,[object Object]
Network events
Scripted, slow
React to change
Update scene
Render Graphics

More Related Content

What's hot

Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDevKotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDevDroidConTLV
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko3D
 
Mobile development in 2020
Mobile development in 2020 Mobile development in 2020
Mobile development in 2020 Bogusz Jelinski
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Bastian Feder
 
KubeCon EU 2018 – Sig API Machinery Deep Dive
KubeCon EU 2018 – Sig API Machinery Deep DiveKubeCon EU 2018 – Sig API Machinery Deep Dive
KubeCon EU 2018 – Sig API Machinery Deep DiveStefan Schimanski
 
vkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan APIvkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan APITristan Lorach
 
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?Albert Mietus
 
Kubernetes API code-base tour
Kubernetes API code-base tourKubernetes API code-base tour
Kubernetes API code-base tourStefan Schimanski
 
Ruby3x3: How are we going to measure 3x
Ruby3x3: How are we going to measure 3xRuby3x3: How are we going to measure 3x
Ruby3x3: How are we going to measure 3xMatthew Gaudet
 
Kubernetes - from sketch to production
Kubernetes - from sketch to productionKubernetes - from sketch to production
Kubernetes - from sketch to productionSergio Shevchenko
 
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019Eugene Kurko
 
How to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rbHow to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rbHiroshi SHIBATA
 
Fluentd - road to v1 -
Fluentd - road to v1 -Fluentd - road to v1 -
Fluentd - road to v1 -N Masahiro
 
Droidcon Nigeria 2021 - Still Sleeping on KMM?
Droidcon Nigeria 2021 - Still Sleeping on KMM? Droidcon Nigeria 2021 - Still Sleeping on KMM?
Droidcon Nigeria 2021 - Still Sleeping on KMM? Emmanuel Kehinde
 

What's hot (20)

Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDevKotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
 
Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++Minko - Scripting 3D apps with Lua and C++
Minko - Scripting 3D apps with Lua and C++
 
Puppet NBLUG 2008-09
Puppet NBLUG 2008-09Puppet NBLUG 2008-09
Puppet NBLUG 2008-09
 
Extending the Kube API
Extending the Kube APIExtending the Kube API
Extending the Kube API
 
Mobile development in 2020
Mobile development in 2020 Mobile development in 2020
Mobile development in 2020
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
C# tutorial
C# tutorialC# tutorial
C# tutorial
 
Droidcon Summary 2021
Droidcon Summary 2021Droidcon Summary 2021
Droidcon Summary 2021
 
KubeCon EU 2018 – Sig API Machinery Deep Dive
KubeCon EU 2018 – Sig API Machinery Deep DiveKubeCon EU 2018 – Sig API Machinery Deep Dive
KubeCon EU 2018 – Sig API Machinery Deep Dive
 
vkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan APIvkFX: Effect(ive) approach for Vulkan API
vkFX: Effect(ive) approach for Vulkan API
 
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
 
Kubernetes API code-base tour
Kubernetes API code-base tourKubernetes API code-base tour
Kubernetes API code-base tour
 
Ruby3x3: How are we going to measure 3x
Ruby3x3: How are we going to measure 3xRuby3x3: How are we going to measure 3x
Ruby3x3: How are we going to measure 3x
 
Kubernetes - from sketch to production
Kubernetes - from sketch to productionKubernetes - from sketch to production
Kubernetes - from sketch to production
 
R ext world/ useR! Kiev
R ext world/ useR!  KievR ext world/ useR!  Kiev
R ext world/ useR! Kiev
 
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
Multiplatform shared codebase with Kotlin/Native - UA Mobile 2019
 
How to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rbHow to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rb
 
XREST Protocol
XREST ProtocolXREST Protocol
XREST Protocol
 
Fluentd - road to v1 -
Fluentd - road to v1 -Fluentd - road to v1 -
Fluentd - road to v1 -
 
Droidcon Nigeria 2021 - Still Sleeping on KMM?
Droidcon Nigeria 2021 - Still Sleeping on KMM? Droidcon Nigeria 2021 - Still Sleeping on KMM?
Droidcon Nigeria 2021 - Still Sleeping on KMM?
 

Similar to TestUpload

The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019corehard_by
 
Software Development Automation With Scripting Languages
Software Development Automation With Scripting LanguagesSoftware Development Automation With Scripting Languages
Software Development Automation With Scripting LanguagesIonela
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
C++ on the Web: Run your big 3D game in the browser
C++ on the Web: Run your big 3D game in the browserC++ on the Web: Run your big 3D game in the browser
C++ on the Web: Run your big 3D game in the browserAndre Weissflog
 
Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)Johan Andersson
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with serverEugene Yokota
 
Source vs object code
Source vs object codeSource vs object code
Source vs object codeSana Ullah
 
Api Versioning with Docker and Nginx
Api Versioning with Docker and NginxApi Versioning with Docker and Nginx
Api Versioning with Docker and Nginxtech.kartenmacherei
 
Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019Iulian Pintoiu
 
Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)DoiT International
 
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5David Voyles
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Eugene Yokota
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011pundiramit
 
Tuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on MobicentsTuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on MobicentsJean Deruelle
 
Camel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel KCamel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel KNicola Ferraro
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_netNico Ludwig
 

Similar to TestUpload (20)

The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
The Hitchhiker's Guide to Faster Builds. Viktor Kirilov. CoreHard Spring 2019
 
Where should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and moreWhere should I run my code? Serverless, Containers, Virtual Machines and more
Where should I run my code? Serverless, Containers, Virtual Machines and more
 
Software Development Automation With Scripting Languages
Software Development Automation With Scripting LanguagesSoftware Development Automation With Scripting Languages
Software Development Automation With Scripting Languages
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
C++ on the Web: Run your big 3D game in the browser
C++ on the Web: Run your big 3D game in the browserC++ on the Web: Run your big 3D game in the browser
C++ on the Web: Run your big 3D game in the browser
 
Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)Parallel Futures of a Game Engine (v2.0)
Parallel Futures of a Game Engine (v2.0)
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 
Source vs object code
Source vs object codeSource vs object code
Source vs object code
 
Api Versioning with Docker and Nginx
Api Versioning with Docker and NginxApi Versioning with Docker and Nginx
Api Versioning with Docker and Nginx
 
Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019Productionizing Machine Learning - Bigdata meetup 5-06-2019
Productionizing Machine Learning - Bigdata meetup 5-06-2019
 
Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)
 
Srgoc dotnet_new
Srgoc dotnet_newSrgoc dotnet_new
Srgoc dotnet_new
 
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)
 
Balancing Power & Performance Webinar
Balancing Power & Performance WebinarBalancing Power & Performance Webinar
Balancing Power & Performance Webinar
 
Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011Android porting for dummies @droidconin 2011
Android porting for dummies @droidconin 2011
 
Tuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on MobicentsTuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on Mobicents
 
Camel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel KCamel Day Italia 2021 - Camel K
Camel Day Italia 2021 - Camel K
 
A Life of breakpoint
A Life of breakpointA Life of breakpoint
A Life of breakpoint
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net
 

Recently uploaded

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Recently uploaded (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

TestUpload

  • 1. Mono And .NET PC54  Miguel de Icaza VP Developer Platform Novell, Inc.
  • 2. Introduction to Mono Mono’s Customizable CLR Mono’s C# Eval Assembly binary reshaping Turbo charging games and graphics Static Compilation Others Agenda
  • 3. Mono 2.0Just released! An open source .NET implementation: A subset of .NET Sponsored by Novell ~120 non-affiliated contributors (1.2 -> 2.0) Direction driven by contributors
  • 4. Our goal is to have a compatible runtime to the CLR ECMA specifications make it possible Develop, build, debug on Visual Studio or Unix Deploy on Linux, Mac OSX and embedded Compatibility
  • 5. APIs Server Third Party Client Postgress, MySQL Sqlite, Oracle, Sybase ASP.NET Gtk# Windows.Forms Tao.Framework Apache and FastCGI Mono.Cairo Gdk# C5 System.Data SQL Server Cocoa# Pango# NDesk.DBus Infrastructure Mono.ZeroConf Mono.Nat Mono.Cecil Mono.Addins Mono.RelaxNG Java/IKVM Novell.Ldap Mono.Fuse Gecko# (Mozilla) Mono.Nat Mono.Torrent Mono.Upnp
  • 6. We can offer a few bonuses Take .NET where no .NET has gone before Offering new forward-compatible features Support special scenarios Mono's CLI Implementation
  • 7. We can offer a few bonuses Take .NET where no .NET has gone before Offering new forward-compatible features Support special scenarios Mono's CLI Implementation
  • 8. CLRs For Everyone Microsoft has the CLR, CF and the CoreCLR CoreCLR is a small version of CLR CoreCLR used in Mesh and Silverlight Compact Framework used in XNA
  • 9. CLRs For Everyone Microsoft has the CLR, CF and the CoreCLR CoreCLR is a small version of CLR CoreCLR used in Mesh and Silverlight Compact Framework used in XNA For everyone else, there is Mono
  • 10. Mono AdaptabilityFrom full framework to tailored framework Full framework is 100 megs (uncompressed) Minimal setup is 2 megs (uncompressed) Modular runtime can be shrunk/grown:
  • 11. The Evolution of a Compiler (or, C# 5 today)
  • 12. Mono's C# 3.0 Compiler C# compiler written in C# Originally, a project to learn to write C# code
  • 13. Mono's C# 3.0 Compiler C# compiler written in C# Originally, a project to learn to write C# code First bootstrap (2001) 17 seconds to bootstrap, 10,000 lines csc compiled it in a second
  • 14. Mono's C# 3.0 Compiler C# compiler written in C# Originally, a project to learn to write C# code First bootstrap (2001) 17 seconds to bootstrap 10,000 lines csc compiled it in a second Speed is no longer a problem Today 82,000 lines in 2.2 seconds 1.6x slower than csc
  • 15. Mono.CSharp.dll – Compiler Service Mono.CSharp.Evaluator Encapsulates the compiler in one class Provides C# Eval and C# Run: using System; using Mono.CSharp; class MyFirstCSharpInterpreter { static void Main (string [] args) { object r = Evaluator.Evaluate (args [0]); Console.WriteLine (r); } }
  • 16. Mono.CSharp – Applications Read-Eval-Print-Loop (repl) Script applications with C# Rapid prototyping in target language Automation Would be cool to have this on every app!
  • 17. The csharp Command Python and Ruby have interactive shells Read-Eval-Print Loop Expressions and Statements: csharp> 1; 1; csharp> “Hello, World”.IndexOf (“,”); 5; csharp> 1 + > 2; 3 csharp> var a = Console.ReadLine ();
  • 18. LINQ From The Command Line $ csharp Mono C# Shell, type “help;” for help Enter statements below. csharp> using System.IO; csharp> var last_week = DateTime.Now – TimeSpan.FromDays (7); csharp> from f in Directory.GetFiles (“/etc”) > let fi = new FileInfo (f) > where fi.LastWriteTime < last_week > select f; { “/etc/adjtime”, “/etc/asound.state”, “/etc/ld.so.cache”, “/etc/mtab”, “/etc/printcap”, “/etc/resolv.conf” } csharp>
  • 19. Interactive LINQ To XML csharp> LoadLibrary (“System.Xml.Linq”); csharp> using System.Xml.Linq; csharp> var xml = new XElement("CompilerSources", >   from f in Directory.GetFiles ("/cvs/mcs/mcs") >   let fi = new FileInfo (f) >   orderby fi.Length      >   select new XElement ("file",  > new XAttribute ("name", f),  > new XAttribute ("size", fi.Length)));csharp> xml;<CompilerSources> <file name="/cvs/mcs/mcs/mcs.exe.config" size="395" /> <file name="/cvs/mcs/mcs/gmcs.exe.config" size="464" />  <file name="/cvs/mcs/mcs/OPTIMIZE" size="498" />  <file name="/cvs/mcs/mcs/lambda.todo" size="658" /> [...]</CompilerSources>
  • 20. GUI ShellC# eval hosted in a GUI Replace base class, with GUI base class:
  • 21. GUI ShellC# eval hosted in a GUI Replace base class, with GUI base class:
  • 22. GUI Shell, Quick Plot Method Plot (Func<double,double>);
  • 23. GUI Shell, Quick Plot Method Plot (Func<double,double>);
  • 24.
  • 25.
  • 31. Mono Linker Use Cases Shrinking Assemblies Shipping only what is required Simplify deployment Create your own Compact Framework What you need from the superset .NET 3.5 to Silverlight We reshape our assemblies. Minimal hand-editing/tuning.
  • 32. Beyond the CLR: Innovating On ASolid FoundationVirtual machines are fascinating Great innovations are possible Build on an existing large ecosystem Instrument, expand, innovate Special code generation
  • 33. Beyond the CLR: Innovating On ASolid FoundationVirtual machines are fascinating Great innovations are possible Build on an existing large ecosystem Instrument, expand, innovate Special code generation VM potential limited by vendor realities Provider scarcity Shipping dates Staffing Product Management Feature prioritization
  • 34. Injecting Code Into A Live ProcessThe Mono.Attach.VirtualMachine API On the root AppDomain, on a new thread
  • 35. Injecting GUI Interactive C#Consoles for everyone!
  • 36. Turbocharging Games Fast, Productive, Safe. Pick all three.
  • 37.
  • 39. Scene
  • 42. GUI
  • 52. Audio
  • 53. Input
  • 54.
  • 60.
  • 62. Scene
  • 65. GUI
  • 75. Audio
  • 76. Input
  • 78. Language Choices Fully Dynamic Easy C#/Java Productivity C/C++ Assembly Language Difficult Performance Fast Slow
  • 79. Mono in Gaming TodayMoving from scripting to static/compiled Mono’s CLR is ideal for embedding
  • 80. Mono in Gaming TodayMoving from scripting to static/compiled Mono’s CLR is ideal for embedding Some examples SecondLife: Switched from LSL to Mono 50x to 300x performance increase
  • 81. Mono in Gaming TodayMoving from scripting to static/compiled Mono’s CLR is ideal for embedding Some examples SecondLife: Switched from LSL to Mono 50x to 300x performance increase Unity3D: Powers Cartoon Network’s FusionFall Uses C#, UnityScript and Boo UnityScript is a strongly typed Javascript
  • 82. Demo
  • 83. Managed Code In GamingImproving developer productivity while maintaining program speed Traditional Game AI Scripted Slow/easy Game Engines Compiled Fast/Hard Graphics Engine Compiled Fast/Hard
  • 84. Managed Code In GamingImproving developer productivity while maintaining program speed Traditional Improved Game AI Scripted Slow/easy Managed Fast/Easy Game Engines Compiled Fast/Hard Compiled Fast/Hard Graphics Engine Compiled Fast/Hard Compiled Fast/Hard
  • 85. Managed Code In GamingImproving developer productivity while maintaining program speed Traditional Improved Future Game AI Scripted Slow/easy Managed Fast/Easy Managed Fast/Easy Game Engines Compiled Fast/Hard Compiled Fast/Hard Managed Fast/Easy Graphics Engine Compiled Fast/Hard Compiled Fast/Hard Compiled Fast/Hard
  • 86. 3D Floating Point Vector OperationsAt the core of gaming engines Exploring an innocent looking loop in C#: UpdatePos (Vector3f [] points, ref Vector3f delta) { for (int i = 0; i < points.Length; i++) points [i] += delta; } xi yi zi δx δy δz xi+δx yi+δy zi+δz + = Vector3f static operator + (Vector3f a, Vector3f b) { return new Vector3f (a.x+b.x, a.y+b.y, a.z+b.z); }
  • 87. UpdatePos Method In ILThe code that does the addition .method private static hidebysig default void UpdatePos (valuetype [Mono.Simd]Mono.Simd.Vector4f[] points, valuetype [Mono.Simd]Mono.Simd.Vector4f& delta) cil managed { // Method begins at RVA 0x2144 // Code size 50 (0x32) .maxstack 4 .locals init (int32 V_0) IL_0000: ldc.i4.0 IL_0001: stloc.0 IL_0002: br IL_0028 IL_0007: ldarg.0 IL_0008: ldloc.0 IL_0009: ldelema [Mono.Simd]Mono.Simd.Vector4f IL_000e: dup IL_000f: ldobj [Mono.Simd]Mono.Simd.Vector4f IL_0014: ldarg.1 IL_0015: ldobj [Mono.Simd]Mono.Simd.Vector4f IL_001a: call valuetype [Mono.Simd]Mono.Simd.Vector4f valuetype [Mono.Simd]Mono.Simd.Vector4f::op_Addition(valuetype [Mono.Simd]Mono.Simd.Vector4f, valuetype [Mono.Simd]Mono.Simd.Vector4f) IL_001f: stobj [Mono.Simd]Mono.Simd.Vector4f IL_0024: ldloc.0 IL_0025: ldc.i4.1 IL_0026: add IL_0027: stloc.0 IL_0028: ldloc.0 IL_0029: ldarg.0 IL_002a: ldlen IL_002b: conv.i4 IL_002c: blt IL_0007 IL_0031: ret } // end of method X::UpdatePos
  • 88. Vector4f.op_Addition in ILThe IL implementation // method line 24 .method public static hidebysig specialname default valuetype Mono.Simd.Vector4f op_Addition (valuetype Mono.Simd.Vector4f v1, valuetype Mono.Simd.Vector4f v2) cil managed { // Method begins at RVA 0x24ac // Code size 69 (0x45) .maxstack 7 .locals init ( valuetype Mono.Simd.Vector4f V_0) IL_0000: ldloca.s 0 IL_0002: ldarga.s 0 IL_0004: ldfld float32 Mono.Simd.Vector4f::x IL_0009: ldarga.s 1 IL_000b: ldfld float32 Mono.Simd.Vector4f::x IL_0010: add IL_0011: ldarga.s 0 IL_0013: ldfld float32 Mono.Simd.Vector4f::y IL_0018: ldarga.s 1 IL_001a: ldfld float32 Mono.Simd.Vector4f::y IL_001f: add IL_0020: ldarga.s 0 IL_0022: ldfld float32 Mono.Simd.Vector4f::z IL_0027: ldarga.s 1 IL_0029: ldfld float32 Mono.Simd.Vector4f::z IL_002e: add IL_002f: ldarga.s 0 IL_0031: ldfld float32 Mono.Simd.Vector4f::w IL_0036: ldarga.s 1 IL_0038: ldfld float32 Mono.Simd.Vector4f::w IL_003d: add IL_003e: call instance void valuetype Mono.Simd.Vector4f::'.ctor'(float32, float32, float32, float32) IL_0043: ldloc.0 IL_0044: ret } // end of method Vector4f::op_Addition
  • 89. UpdatePos in x86 codeGenerated asssembly code 00000000 <X_UpdatePos>: 69: 89 0c 24 mov %ecx,(%esp) 0: 55 push %ebp 6c: 8b 4d d8 mov -0x28(%ebp),%ecx 1: 8b ec mov %esp,%ebp 6f: 89 4c 24 04 mov %ecx,0x4(%esp) 3: 53 push %ebx 73: 8b 4d dc mov -0x24(%ebp),%ecx 4: 57 push %edi 76: 89 4c 24 08 mov %ecx,0x8(%esp) 5: 56 push %esi 7a: 8b 4d e0 mov -0x20(%ebp),%ecx 6: 83 ec 38 sub $0x38,%esp 7d: 89 4c 24 0c mov %ecx,0xc(%esp) 9: 8b 75 08 mov 0x8(%ebp),%esi 81: 83 ec 10 sub $0x10,%esp c: 8b 7d 0c mov 0xc(%ebp),%edi 84: 8b 4d c4 mov -0x3c(%ebp),%ecx f: 33 db xor %ebx,%ebx 87: 89 0c 24 mov %ecx,(%esp) 11: e9 ad 00 00 00 jmp c3 <X_UpdatePos+0xc3> 8a: 8b 4d c8 mov -0x38(%ebp),%ecx 16: 8b c0 mov %eax,%eax 8d: 89 4c 24 04 mov %ecx,0x4(%esp) 18: 39 5e 0c cmp %ebx,0xc(%esi) 91: 8b 4d cc mov -0x34(%ebp),%ecx 1b: 0f 86 b5 00 00 00 jbe d6 <X_UpdatePos+0xd6> 94: 89 4c 24 08 mov %ecx,0x8(%esp) 21: 8b cb mov %ebx,%ecx 98: 8b 4d d0 mov -0x30(%ebp),%ecx 23: c1 e1 04 shl $0x4,%ecx 9b: 89 4c 24 0c mov %ecx,0xc(%esp) 26: 8b c6 mov %esi,%eax 9f: 50 push %eax 28: 03 c1 add %ecx,%eax a0: e8 43 00 00 00 call op_Addition 2a: 05 10 00 00 00 add $0x10,%eax a5: 83 c4 20 add $0x20,%esp 2f: 89 45 bc mov %eax,-0x44(%ebp) a8: 8b 45 bc mov -0x44(%ebp),%eax 32: 8b 08 mov (%eax),%ecx ab: 8b 4d e4 mov -0x1c(%ebp),%ecx 34: 89 4d c4 mov %ecx,-0x3c(%ebp) ae: 89 08 mov %ecx,(%eax) 37: 8b 48 04 mov 0x4(%eax),%ecx b0: 8b 4d e8 mov -0x18(%ebp),%ecx 3a: 89 4d c8 mov %ecx,-0x38(%ebp) b3: 89 48 04 mov %ecx,0x4(%eax) 3d: 8b 48 08 mov 0x8(%eax),%ecx b6: 8b 4d ec mov -0x14(%ebp),%ecx 40: 89 4d cc mov %ecx,-0x34(%ebp) b9: 89 48 08 mov %ecx,0x8(%eax) 43: 8b 40 0c mov 0xc(%eax),%eax bc: 8b 4d f0 mov -0x10(%ebp),%ecx 46: 89 45 d0 mov %eax,-0x30(%ebp) bf: 89 48 0c mov %ecx,0xc(%eax) 49: 8b 07 mov (%edi),%eax c2: 43 inc %ebx 4b: 89 45 d4 mov %eax,-0x2c(%ebp) c3: 8b 46 0c mov 0xc(%esi),%eax 4e: 8b 47 04 mov 0x4(%edi),%eax c6: 3b d8 cmp %eax,%ebx 51: 89 45 d8 mov %eax,-0x28(%ebp) c8: 0f 8c 4a ff ff ff jl 18 <X_UpdatePos+0x18> 54: 8b 47 08 mov 0x8(%edi),%eax ce: 8d 65 f4 lea -0xc(%ebp),%esp 57: 89 45 dc mov %eax,-0x24(%ebp) d1: 5e pop %esi 5a: 8b 47 0c mov 0xc(%edi),%eax d2: 5f pop %edi 5d: 89 45 e0 mov %eax,-0x20(%ebp) d3: 5b pop %ebx 60: 8d 45 e4 lea -0x1c(%ebp),%eax d4: c9 leave 63: 83 ec 10 sub $0x10,%esp d5: c3 ret 66: 8b 4d d4 mov -0x2c(%ebp),%ecx
  • 90. Mono.SIMD: Mapping To Native InstructionsSIMD aware runtime Object-oriented APIs for Vector processing Vector4f, Vector4i, Vector2d, Vector16b, etc Mapped to hardware operations Detect SIMD use
  • 91. UpdatePos With Mono’s SIMD 00000000 <X_UpdatePos>: 0: 55 push %ebp 1: 8b ec mov %esp,%ebp 3: 53 push %ebx 4: 57 push %edi 5: 56 push %esi 6: 83 ec 04 sub $0x4,%esp 9: 8b 75 08 mov 0x8(%ebp),%esi c: 8b 7d 0c mov 0xc(%ebp),%edi f: 33 db xor %ebx,%ebx 11: eb 29 jmp 3c <X_UpdatePos+0x3c> 13: 8d 64 24 00 lea 0x0(%esp),%esp 17: 90 nop 18: 39 5e 0c cmp %ebx,0xc(%esi) 1b: 0f 86 2a 00 00 00 jbe 4b <X_UpdatePos+0x4b> 21: 8b cb mov %ebx,%ecx 23: c1 e1 04 shl $0x4,%ecx 26: 8b c6 mov %esi,%eax 28: 03 c1 add %ecx,%eax 2a: 05 10 00 00 00 add $0x10,%eax 2f: 0f 10 00 movups (%eax),%xmm0 32: 0f 10 0f movups (%edi),%xmm1 35: 0f 58 c1 addps %xmm1,%xmm0 38: 0f 11 00 movups %xmm0,(%eax) 3b: 43 inc %ebx 3c: 8b 46 0c mov 0xc(%esi),%eax 3f: 3b d8 cmp %eax,%ebx 41: 7c d5 jl 18 <X_UpdatePos+0x18> 43: 8d 65 f4 lea -0xc(%ebp),%esp 46: 5e pop %esi 47: 5f pop %edi 48: 5b pop %ebx 49: c9 leave 4a: c3 ret
  • 93. Mono.SIMD: SpeedupsPhysics simulations, no optimizations Based on the C++ simulation code at sharp-gamedev.blogspot.com/2008/09/updated-c-version.html
  • 94. Ahead Of Time CompilationBatch compilation of CIL/.NET code Ahead of Time compilation (AOT): “ngen” in the .NET world Precompiled IL code to native code Visible effects Saves on startup time Decreases footprint across multiple processes Produces slower code Not complete Can handle most of the JIT generated code A few bits are not AOTed
  • 95. Full Ahead Of Time CompilationEntirely static compilation of CIL/.NET code Some devices disable on the fly codegen: iPhone OS 2.x, XBox360 Full AOT: Does AOT for the missing bits
  • 96. Demo – Mono on iPhone.
  • 97. Other TopicsMuch more Mono Continuations Like Stackless-Python Cooperative multi-threading Avoids concurrency bugs Concurrency achieved with processes Supercomputing Mono 64 bit arrays
  • 98. Learning More About Mono http://www.mono-project.com Getting Started http://www.mono-project.com/Start Community blogs http://www.go-mono.com/monologue Miguel’s blog http://tirania.org/blog
  • 99. Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
  • 100. Please use the microphones provided Q&A
  • 101. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.