Moderators JLogan3o13 Posted April 4, 2014 Moderators Share Posted April 4, 2014 Thought this was an interesting article. Supposed to take C# down to machine code that performs the same as C++, with quite a large performance boost. http://blogs.msdn.com/b/dotnet/archive/2014/04/02/announcing-net-native-preview.aspx JohnOne 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Mat Posted April 4, 2014 Share Posted April 4, 2014 Probably depends on what parts of the framework you use whether you can actually get C++ level performance. I'd be interested to see what they do with strings in particular, as much of the low level performance with strings is because they are rubbish. In any case, it's very good for getting C# used more. It's a much better language than C++. AutoIt Project Listing Link to comment Share on other sites More sharing options...
JohnOne Posted April 4, 2014 Share Posted April 4, 2014 Sounds really good, I stopped using C# because it did not compile to native code and started using C/++ instead. C# is relatively easy, almost as easy as AutoIt3 so I'd love to try it again with .Net Native. First question that comes to mind, and that I did not find an answer to in the .Net Native FAQ is, When and if they support desktop apps and not just windows store apps, will it mean we can compile dynamic link libraries with .net functionality to native code? Will be definitely following it's development. Thanks for the heads up JLo. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 4, 2014 Author Moderators Share Posted April 4, 2014 @JohnOne, I was thinking along the same lines. Everything I have seen thus far talks about windows store apps only, but I'm hoping they'll soon announce expansion to more than just that. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
guinness Posted April 4, 2014 Share Posted April 4, 2014 Very interesting indeed. Thanks for sharing. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 10, 2014 Share Posted April 10, 2014 For those of you who are confused about it being Metro apps only, it's because the desktop version has already been available since the launch of .Net. This is just Metro ngen. http://msdn.microsoft.com/en-us/library/6t9t5wcf%28v=vs.110%29.aspx Link to comment Share on other sites More sharing options...
JohnOne Posted April 10, 2014 Share Posted April 10, 2014 (edited) Can Ngen compile C# code to native PE file? Edited April 10, 2014 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 11, 2014 Share Posted April 11, 2014 Can Ngen compile C# code to native PE file? No. ngen takes a complete assembly (exe or dll) and compiles it to platform specific x86/x64 binary and caches it for when the framework is told to execute said assembly. It's meant to be run on the machine that will run the assembly. All assemblies in the global assembly cache are automatically run through ngen as well when registered, if I remember correctly. Link to comment Share on other sites More sharing options...
Ascend4nt Posted April 24, 2014 Share Posted April 24, 2014 I've been watching the .NET native stuff myself and its sorta renewed interest in C# for me. I hope they will move ahead and make apps natively compile for O/S's prior to Windows 8 - they had mentioned it was in their plans so keep your fingers crossed. As far as the 'desktop versoin' being 'ngen', that's baloney. There is not native compilation yet. If C#'s cross-platform support via mono and xamarin are fairly trouble-free I might put more effort into learning the language.. (right now D is my baby) My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 24, 2014 Share Posted April 24, 2014 As far as the 'desktop versoin' being 'ngen', that's baloney. There is not native compilation yet. I'm going to stop you right there because ngen is in fact a .Net assembly to machine code compiler. It doesn't give you the binary to do what you want with, but it does compile it. That's as native as any .Net application can get without removing the ability to continue accessing the framework. It's also worth noting that just running an assembly on the .Net platform (dunno about Mono) will also compile it to a native binary, just piecewise in memory instead of cached to disk. Link to comment Share on other sites More sharing options...
Ascend4nt Posted April 24, 2014 Share Posted April 24, 2014 Richard, you seem to be changing your argument as you go along - so much so that I'm not entirely sure what you know and what you don't. If we examine your first entry in this thread, you said that .NET native is 'just Metro ngen,' which is entirely inaccurate. So, let me try to clear things up with the whole NGEN-native-compilation mess. First, .NET Native is not the same as NGEN 'pre-JIT' force-compiled code. 2 completely different things. With .NET Native, the compiler creates a binary executable that can be redistributed with nothing more than the MRT.dll (Minimal CLR Runtime - see Compiling Apps with .NET Native). This is as opposed to an MSIL/CIL-compiled app which requires the entire .NET framework (and isn't native at all). Now, if we look at NGEN native-compilation, there are a few problems to consider: NGEN must be done forcefully. C# apps are not 'automagically' compiled to native executables. The normal method for making NGEN work is to initiate it as a final part of a program installation. Distributing a simple C# executable will fail to get any ngen-compiled benefits. Even with the "Automatic Native Image Generation" in Windows 8, the program needs to be installed as a Windows Store app or put in the GAC (oh and use .NET 4.5+). (Creating Native Images) NGEN-compiled executables are machine and O/S-specific. The executable and DLL's can NOT be extracted and used elsewhere. Oh, and .NET-specific as well. It still needs the entire .NET (version whatever.xx) architecture support. NGEN-compiled executables won't be nearly as good as the Microsoft C/C++ compiler backend that is being used in .NET Native. Basically, NGEN is a very specific optimization step that may or may not be done based on the way a program's INSTALLER is set up. Or - if you are that crazy - as a manual optimization (have fun with the ngen command line!). So, all in all, equating NGEN to .NET Native is ridiculous. Very, very different things. One is guaranteed-fast natively-compiled code that is portable and requires only the MRT.dll runtime [.NET Native]; the other is a machine-specific installation-specific optimization of MSIL/CIL code that may or may not run faster than JIT-compiled code and also happens to require the entire .NET framework installed (and a specific version at that), plus it isn't portable [NGEN]. Hope that clears the matter up! My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now