Slashdot Mirror


.NET Native Compilation Preview Released

atrader42 (687933) writes "Microsoft announced a new .NET compiler that compiles .NET code to native code using the C++ compiler backend. It produces performance like C++ while still enabling .NET features like garbage collection, generics, and reflection. Popular apps have been measured to start up to 60% faster and use 15% less memory. The preview currently only supports Windows Store applications, but is expected to apply to more .NET applications in the long term. A preview of the compiler is available for download now. (Caveat: I both work for MS and read Slashdot.)"

217 comments

  1. I thought April fools was 2 days ago? by Skinkie · · Score: 0

    Maybe the Haskell team at Microsoft Research really didn't have anything better to do.

    --
    Support Eachother, Copy Dutch Property!
    1. Re:I thought April fools was 2 days ago? by Tough+Love · · Score: 3, Interesting

      It actually sounds like gcj.

      --
      When all you have is a hammer, every problem starts to look like a thumb.
  2. Huh? by Desler · · Score: 5, Funny

    Popular apps have been measured to start up to 60% and use 15% less memory.

    So they no longer fully start up? Why is that a benefit?

    1. Re:Huh? by K.+S.+Kyosuke · · Score: 0

      Yeah, especially since if they started up to the other 40%, they'd apparently use 85% less memory. My number-fu is better than your number-fu!

      --
      Ezekiel 23:20
    2. Re:Huh? by Soulskill · · Score: 2, Informative

      The word 'faster' was omitted. I've updated to fix.

    3. Re:Huh? by davester666 · · Score: 1

      faster to first crash?

      --
      Sleep your way to a whiter smile...date a dentist!
  3. Open source compiler by rabtech · · Score: 5, Interesting

    They also open-sourced their new C# compiler:

    http://roslyn.codeplex.com/

    --
    Natural != (nontoxic || beneficial)
    1. Re:Open source compiler by ackthpt · · Score: 2, Insightful

      Isn't it time for yet-another-language? How about C$ ?

      --

      A feeling of having made the same mistake before: Deja Foobar
    2. Re:Open source compiler by Bacon+Bits · · Score: 4, Funny

      I'm not going back to GW-BASIC, thanks,

      --
      The road to tyranny has always been paved with claims of necessity.
    3. Re:Open source compiler by datapharmer · · Score: 2

      It's already in use by the administrative share.

      --
      Get a web developer
    4. Re:Open source compiler by Anonymous Coward · · Score: 1

      Anyone else think it's too little too late?
      Sorry Microsoft, you had your chance. We now went the long way around you and not coming back. :|

    5. Re:Open source compiler by NatasRevol · · Score: 1

      Fine. Shift-5 then.

      --
      There are two types of people in the world: Those who crave closure
    6. Re:Open source compiler by Anonymous Coward · · Score: 1

      I'm highly proficient in C:\>

    7. Re:Open source compiler by serviscope_minor · · Score: 1

      Isn't it time for yet-another-language? How about C$ ?

      C£, so then it really could be unambiguously C-pound.

      --
      SJW n. One who posts facts.
    8. Re:Open source compiler by Anonymous Coward · · Score: 0

      Hey, I'm still using GW-BASIC, you insensitive clod! :)

    9. Re:Open source compiler by Anonymous Coward · · Score: 0

      Actually M#

      http://www.drdobbs.com/windows/microsoft-m-an-extension-of-c/240165199

    10. Re:Open source compiler by EETech1 · · Score: 1

      I know... I hate having to use those darn line numbers..

      And don't even get me started on the three letter variable names!!!

      Qbasic FTW!

  4. So no more .net redistributable? by Kenja · · Score: 2

    This can only be a good thing as every game I install these days also installs the redistribution files for .net.

    --

    "Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
    1. Re:So no more .net redistributable? by TMYates · · Score: 0

      Not true. Native only means that there will be no IL (Intermediate Language) code. Right now .NET is more interpreted than it is compiled. This would mean it gets compiled like C or C++. You would still need the .NET redistributable for any libraries you reference just as you have done with C++ libraries or DLL libraries in traditional Windows development. Not having to compile the code before executing it (using the JIT compiler) means serious performance, but also paves the way to more native support on other devices. Especially since they released it into the open.

    2. Re:So no more .net redistributable? by PhrostyMcByte · · Score: 5, Informative
      Yep! From their FAQ:

      apps will get deployed on end-user devices as fully self-contained natively compiled code (when .NET Native enters production), and will not have a dependency on the .NET Framework on the target device/machine.

    3. Re:So no more .net redistributable? by QuasiSteve · · Score: 2

      every game I install these days also installs the redistribution files for .net.

      Do they actually install them, or are they merely included in the installer packaging and installed if and only if the files are missing or outdated?

    4. Re:So no more .net redistributable? by egr · · Score: 0

      Maybe you mean C++ Redistributables? These have nothing to do with .NET, but rather C++ standard library.

    5. Re:So no more .net redistributable? by dbraden · · Score: 2

      Actually, that's not the case. As already mentioned by PhrostyMcByte above, here's the quote from Microsoft's FAQ:

      apps will get deployed on end-user devices as fully self-contained natively compiled code (when .NET Native enters production), and will not have a dependency on the .NET Framework on the target device/machine.

      Pretty cool in my book.

    6. Re:So no more .net redistributable? by MightyMartian · · Score: 4, Insightful

      Yeah, I can't wait for a half-gigabyte executables.

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    7. Re:So no more .net redistributable? by Desler · · Score: 1

      Maybe you mean C++ Redistributables?

      No, they didn't.

    8. Re:So no more .net redistributable? by man_ls · · Score: 1

      I wonder how big a statically linked OpenOffice executable would be on Debian.

    9. Re:So no more .net redistributable? by Cenan · · Score: 2

      This new compiler actually links the dependent parts of the .Net framework into your native code, to produce a stand alone executable.

      --
      ... whatever ...
    10. Re:So no more .net redistributable? by dkf · · Score: 1

      Yeah, I can't wait for a half-gigabyte executables.

      You mean you're not working with them already?

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    11. Re:So no more .net redistributable? by gbjbaanb · · Score: 1

      This would mean it gets compiled like C or C++. You would still need the .NET redistributable for any libraries you reference just as you have done with C++ libraries or DLL libraries in traditional Windows development

      I see your point - libs will still be needed, whether .NET framework or individual dlls, however... from the comments on the article (yes, I RTFM!!!) it seems you will be able to statically link everything together into a single, self-contained executable.

    12. Re:So no more .net redistributable? by TMYates · · Score: 1

      Just saw that. This will be interesting to see. I hope it means only the framework and not 3rd party libraries because that could make licensing or detecting 3rd party libraries interesting. I know I would want my library to still be separate unless I give you the code.

    13. Re:So no more .net redistributable? by gbjbaanb · · Score: 1

      Yes, and LGPL libraries become effectively GPL.

      Security updates would also be the responsibility of the vendor too - you can't rely on Windows Update to give you new system dlls if they're embedded into your exe.

      But, I do like it as an option.

    14. Re:So no more .net redistributable? by Anonymous Coward · · Score: 0

      The compiled binary will be tree shaked, so no it won't be.

    15. Re:So no more .net redistributable? by Anonymous Coward · · Score: 0

      Why the hell is my comment getting deleted mods! Look here buddy, nothing I said was offensive so no need for this passive aggressive behaviour.

  5. Translator? by Anonymous Coward · · Score: 3, Interesting

    compiles .NET code to native code using the C++ compiler backend

    Can it output the generated C++ source?

    1. Re:Translator? by Cory.Nelson · · Score: 1

      It'd be just like the old days when C++ compilers would preprocess into C.

    2. Re:Translator? by Calavar · · Score: 3, Informative

      Correct me if I am mistaken, but I'm pretty sure that if they are using the backend they are skipping the lexing and parsing steps and going straight to the generation of the intermediate representation. That would mean that there is no generated C++ code to see.

    3. Re:Translator? by benjymouse · · Score: 1

      Correct me if I am mistaken, but I'm pretty sure that if they are using the backend they are skipping the lexing and parsing steps and going straight to the generation of the intermediate representation. That would mean that there is no generated C++ code to see.

      That is precisely what they announced. No correction needed. They use that C++ backend to emit code for specific processor architectures (and core counts) and do global optimizations.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    4. Re:Translator? by Anonymous Coward · · Score: 0

      In other words:
      0110111 01101000 01100001 01110100 00100000 01110100 01101000 01100101 00100000 01100110 01110101 01100011 01101011 00111111

    5. Re:Translator? by aberglas · · Score: 1

      That would be impossible. It is not possible to write garbage collected code in C. That's why C++ libraries resort to reference counting etc. That bit about the C++ compiler back end is misleading, it just means some sort of shared compiler.

      C is not really a high level assembler. It just enshrines an archaic programming model that was popular in 1978.

    6. Re:Translator? by Anonymous Coward · · Score: 0

      > That would be impossible. It is not possible to write garbage collected code in C.

      Oh really ?

  6. New technology! by Anonymous Coward · · Score: 0, Funny

    A fully compiled binary deliverable! Revolutionary!

    (for Microsoft)

    1. Re:New technology! by Bengie · · Score: 2

      Next up, compiled java that doesn't churn through memory.

    2. Re:New technology! by Anonymous Coward · · Score: 1

      Compilation doesn't remove the need for a garbage collector.

      C#/.NET/MSIL has a plain-old-data (POD) struct type that's allocated on the stack and passed around just like a (non-pointer) C struct. However, Java can only allocate things on the stack when escape analysis proves that something cannot escape.

      Yeah, yeah, C# references to structs might have the same escape analysis issue (I haven't used C# in 5 years, so I forget), but at least you know you're doing it. The point is that Java doesn't have the option to declare something that only lives on the stack, so compiled java would still have to churn through memory. :(

    3. Re:New technology! by viperidaenz · · Score: 1
    4. Re:New technology! by ChunderDownunder · · Score: 1

      gcj is largely abandonware since distros adopted openjdk.

      (There might still be a case for an AOT compiler to replace hotspot but I'm not sure Excelsior JET has much industry adoption - at least not in the enterprises I worked at.)

  7. Only benefits smaller devices by yurik · · Score: 1

    The raw speed of the code might actually diminish since the .net runtime could have optimized it better for the specific environment (CPU model, available RAM, phase of the moon, etc). On the other hand, the startup would benefit - no more need to just-in-time compile. Plus there is no need for memory to compile it. On the other hand, the runtime might use some cycles to further optimize code during execution, whereas with this approach the code won't change any further. In any case, great for instant startup, but I suspect conceptually this is not much different from the older binary pre-compiled cached versions of the assemblies.

    1. Re:Only benefits smaller devices by robmv · · Score: 2

      Well, the ART preview native compiler on Android 4.4 is on device so it could compile to native on the device, but I expect Google will accelerate that step precompiling on their servers taking into account device characteristics. Microsoft could do that too if they want

    2. Re:Only benefits smaller devices by benjymouse · · Score: 2

      The raw speed of the code might actually diminish since the .net runtime could have optimized it better for the specific environment (CPU model, available RAM, phase of the moon, etc).

      MS announced that developers still need to pass hints to the compiler on what architecture, CPU core count, available memory etch, to compile for. You can (cross) compile to multiple architectures.

      This technology is already at work when deploying apps for Windows Phone 8: Developers pass IL code to the store, native compilation is performed per device type in the cloud (CPU architecture, OS version, memory, ...) and the binary is passed to the device.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    3. Re:Only benefits smaller devices by ebno-10db · · Score: 1

      The raw speed of the code might actually diminish since the .net runtime could have optimized it better for the specific environment (CPU model, available RAM, phase of the moon, etc).

      I hate to break it to you, but the original Pentium is now obsolete. Compiling for a specific CPU variant doesn't help much these days. I'm also unaware of any JIT compiler that adjusts the code for available RAM. You might have a point about the phase of the moon.

      Basically you're citing the standard tropes used in defense of JIT. Theoretically it can make some difference, but when I ask for benchmarks showing code on a JIT running faster than straight-to-binary, all I hear is crickets.

    4. Re:Only benefits smaller devices by viperidaenz · · Score: 1

      Compiling for a specific CPU variant doesn't help much these days.

      That depends if you use SSE, AVX, AES-NI or any of the other significant performance enhancing additions to recent CPU's.

      Show me some code compiled with AES-NI support that isn't significantly faster than code without hardware accelerated AES instructions.

    5. Re:Only benefits smaller devices by Megol · · Score: 1
      Pentium? Do you really think x86 evolution ended with the Pentium?!? Here's a _subset_ of cases that differs on current designs and can make a performance difference:
      • CMOV (conditional move): can be beneficial for some processors while mostly useless for others.
      • Micro-op fusion. Some processors support some kind of fusion (where a compare-type instruction is fused with a branch dependent on the comparison). Which types of compare can be combined to which types of conditional branch differs.
      • Zeroing constructs. These differs between processors, also some processors can remove some of them from execution while others "just" allow them to remove false dependencies.
      • Move elimination. Some processors can remove some MOV instructions from execution (they are "executed" by the register renamer instead). Some optimizing problems: which kinds of MOV instructions should be used, when should they be used.
      • Partial register updates. Some processors handle them one way (keep parts together - with potential extra dependencies) and others do them another (keeps parts separate but add extra ops to fuse together the parts when needed).

      This ignores the fact that different processors support different types of extensions _and_ that different processors that support the same kind of extensions can differ a lot in how optimal some instructions are executed.

      • MOVBE (MOV instruction with big endian ordering): some execute these as fast as a normal MOV, some executes them as a MOV followed by a BSWAP operation.
      • PCMP*STR* (parallel string compare): some executes these very slow, some executes them fairly fast.
      • AES.
      • CRC32.
    6. Re:Only benefits smaller devices by serviscope_minor · · Score: 1

      Compiling for a specific CPU variant doesn't help much these days.

      Do you have any numbers? GCC has a bunch of different cost models for scheduling for different CPUs and regularly gets new ones added. That said I'm not sure I've ever seen a vast amount of difference, and less recently compared to the GCC3 days and PIII versus P4 which had very different costs.

      Also, fun thing, with multiversioning, GCC can now compile multiple funtion versions using different instruction set subsets and switch at load time. I expect that does make a difference if you happen to have code which benefits from some funky new vector-op.

      Basically you're citing the standard tropes used in defense of JIT. Theoretically it can make some difference, but when I ask for benchmarks showing code on a JIT running faster than straight-to-binary, all I hear is crickets.

      Well, yes. Every year the usual suspects claim "This year we're 20% faster and now as fast as C++!". Naturally, these repeated claims cannot be consistent and following logically from the first one they ought to be thousands of times faster by now.

      Ironically, for the only language which actually has a reasonable and accurate claim to being faster than C++ (that is FORTRAN (yeah, upper case---suck it)), the proponents never actually make the claim, they just shut up and get on with writing the sort of high performance numeric codes that us C++ programmers like to call in LAPACK and so on.

      Part of me hopes that some day things like Java, C# etc will claim to be "nearly as fast as fortran this year, we promise".

      The other problem with JIT is not that it's JIT but the languages are inevitably garbage collected. I saw a paper a while back (can't find link) which showed the performance decreasing asymptotically towards zero as the GC memory use approached the optimal memory use. IOW, GC code will need to have a higher memory overhead which will mean worse cache performance.

      The other problem with the JITted languages is that they don't do stack allocation. Sure the compiler can figure out some (escape analysis), but the reason C++ is faster is because the compiler is perfect in this regard (it has nothing to figure out). This is the exact same reason that Fortran is faster than C++: it is perfect inferring things about pointer aliasing because there is nothing to infer.

      The final thing is the JITted languages have much more restritive machine models, limiting possible optimizations.

      Given LLVM can now JIT stuff, it would be interesting to see comparisons on a level playing field: e.g. C++ static versus JIT. Both should have identical performance for all the important incedentals, so that should really be a test to see if JIT can live up to its promise of being better.

      --
      SJW n. One who posts facts.
    7. Re:Only benefits smaller devices by gbjbaanb · · Score: 1

      yes, the comments on TFM say that you have to upload MSIL to the APPStore server which will compile it to native code. I expect they will compile to all known architectures at that point.

      So the appstore will become a compile farm.... I like that, I remember when sourceforge did exactly that.

  8. Run more native Windows apps on Linux by common-lisp · · Score: 2, Insightful

    From the article:

    the .NET Native runtime [is] a refactored and optimized CLR

    According to the article, the .NET Native runtime is a (not yet complete) implementation of .NET. This means that Wine + .NET Native = a Microsoft-built .NET runtime on Linux. This is good news because this may be a way to take those .NET technologies missing from Mono, such as WPF, and still use them on Linux.

    Another reason this is good news is, we're one step closer to being able to develop Windows installers in .NET. Lately I've been using NSIS and it is the most stupid, idiotic language I've ever used. It's been described as a mixture of PHP and assembly.

    Another thought: the article doesn't seem to mention it, but judging by the design, the .NET Native compiler may be able to compile any .NET DLLs and EXEs, not just C# ones.

    1. Re:Run more native Windows apps on Linux by common-lisp · · Score: 3, Insightful

      If you care so much about all that windows crap, why are you running Linux at all?

      Because Linux is much easier to develop with.

      Some Windows technologies (WPF, .NET, C#) are well designed, as are many Linux technologies. Seeing the benefits of one platform isn't mutually exclusive with seeing the benefits of another platform.

      However, what is mutually exclusive is a tribal mindset and the ability to see two sides of the situation.

    2. Re:Run more native Windows apps on Linux by wonkey_monkey · · Score: 2

      Breaking news! Some people use Linux but have a need for something that's only ostensibly available for Windows!

      --
      systemd is Roko's Basilisk.
    3. Re:Run more native Windows apps on Linux by Anonymous Coward · · Score: 0

      And who cares about software that only runs on a rapidly dying platform?

    4. Re:Run more native Windows apps on Linux by Anonymous Coward · · Score: 0

      The death of MS has been greatly exaggerated...

    5. Re:Run more native Windows apps on Linux by Anonymous Coward · · Score: 1, Insightful

      Linux isn't dying. yes it is a long way behind MS and MS are still very much dominate, but Linux isn't going anywhere.

    6. Re:Run more native Windows apps on Linux by Anonymous Coward · · Score: 0

      WPF , Linq et al. are missing due to LICENSING.

      Only .Net 2.0 is allowed to be implemented, that is why such nice technology API's as WPF et al. are NOT in Mono et al.

      NO GO AREAS
      post 2.0 .Net
      VB
      Office
      et al.

      If you start to implement these, you will get your asses dragged into every court in the land.

      Read Microsoft's community promises for a list.

      http://www.microsoft.com/openspecifications/en/us/programs/community-promise/default.aspx

      http://www.microsoft.com/openspecifications/en/us/programs/community-promise/covered-specifications/default.aspx

      http://www.microsoft.com/openspecifications/en/us/programs/community-promise/covered-specifications-special-terms/default.aspx

      ONLY ECMA standards are promised, anything else, you're in a big deep minefield and you have NOWHERE NEAR the amount of money and time to fight it.

    7. Re:Run more native Windows apps on Linux by EvilIdler · · Score: 2

      Linq isn't missing from Mono: http://stackoverflow.com/quest... All the WPF stuff definitely is, but a good chunk of .NET 3.5 and up is implemented. They haven't been assaulted by attack-lawyers yet either.

    8. Re:Run more native Windows apps on Linux by Kalriath · · Score: 0

      If you're going to make installers on Windows, you should be doing it in WiX. NSIS, InstallAware, and other "native" installers need to go away, and the sooner the better.

      --
      For a site about things like basic rights, Slashdot users sure do like to censor "dissent".
    9. Re:Run more native Windows apps on Linux by Anonymous Coward · · Score: 0, Flamebait

      just look at market . for example last week india state switch from windows to linux . i dont think this as exaggerating!!!

    10. Re:Run more native Windows apps on Linux by Anonymous Coward · · Score: 0

      When they get Boot to Mono on Android for embedded, wake me up.

      C# without memory management and reflection, will frankly be SHIT TBH lol.

    11. Re:Run more native Windows apps on Linux by TangoMargarine · · Score: 1

      Which one is supposed to be the rapidly dying platform? :)

      --
      Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
  9. Re:Ah... by i+kan+reed · · Score: 3, Insightful

    Yeah, sorry, GUIs won. Like 20 years ago. You can stop pretending that our multicore processors with 64 gigs of ram can't handle them.

  10. VB.NET support is right around the corner. by Anonymous Coward · · Score: 0

    Good thing too...

  11. Re:Ah... by jafac · · Score: 2, Informative

    When installing a security update for .NET takes 45 minutes, there is no pretending involved.

    --

    These are my friends, See how they glisten. See this one shine, how he smiles in the light.
  12. Native Image Generator by Anonymous Coward · · Score: 0

    I believe this already exists for "real computers". It's called the Native Image Generated (http://msdn.microsoft.com/en-us/library/6t9t5wcf(v=vs.110).aspx). It's been included with .Net since 1.1.

    1. Re:Native Image Generator by ThePhilips · · Score: 1, Interesting

      That doesn't sound like a proper native compiler:

      The Native Image Generator (Ngen.exe) is a tool that improves the performance of managed applications. Ngen.exe creates native images, which are files containing compiled processor-specific machine code, and installs them into the native image cache on the local computer. The runtime can use native images from the cache instead of using the just-in-time (JIT) compiler to compile the original assembly.

      Yes, it does produce native code.

      No, it doesn't produce an executable, ready for redistribution.

      I do not disagree with the approach, but there is still the difference. If done right, it might be a blessing: code is optimized for the local CPU. If done poorly (as MS likes to do it sometimes) it might mean irreproducible bugs or performance regressions and outright no effect at all, if cache gets corrupted somehow.

      --
      All hope abandon ye who enter here.
    2. Re:Native Image Generator by Cenan · · Score: 1

      NGEN just caches the JIT output of an assembly, it does not produce a native executable.

      --
      ... whatever ...
    3. Re:Native Image Generator by TangoMargarine · · Score: 1

      So what do you call a programmer who uses NIG? *cough*

      --
      Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
  13. It produces performance like C++ by innocent_white_lamb · · Score: 1

    "It produces performance like C++".

    How many times over the years have I seen this? "Widget-of-the-month is almost as fast and efficient as C."

    My response is, if the performance is important then why not do it in C? C is definitely as efficient as C. If performance is not important, then why does it matter?

    I don't see the need to spend time and/or money on something that's "almost as good as C" when C itself is available.

    "This cardboard pizza is almost as good as a real pizza and it only costs $10 more!" Er, no thanks?

    --
    If you're a zombie and you know it, bite your friend!
    1. Re:It produces performance like C++ by Anonymous Coward · · Score: 1

      >My response is, if the performance is important then why not do it in C?

      Performance is *always* important, but sometimes it's less important than development time. If I can develop/maintain a complex set of tools in C# taking 1/10 of the time than doing it in C, why not do it in C# if it runs fast enough?

      So it's only a bonus if development is easy AND you get performance closer to C.

    2. Re:It produces performance like C++ by MightyMartian · · Score: 1, Insightful

      Is C really that hard to develop in? After all, the chief advantages of C# isn't really C#, but the .NET libraries. C/C++ with good libraries strikes me as being a reasonably good option. If I'm just going to end up compiling it to down to machine code anyways, why bother with .NET at all? I get it if you have an existing code base you want to squeeze some more cycles out of, but if I were starting a new project tomorrow, give me one reason why a C# compiler is the way to go as opposed to C++?

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    3. Re:It produces performance like C++ by sconeu · · Score: 1

      Parent has the right of it. Performance is only part of the equation. There's what I call the X-abilities. Readability, maintainability, scalability, you-name-it-ability.

      Often, raw C can fail on those.

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    4. Re:It produces performance like C++ by fyngyrz · · Score: 1

      Exactly.

      --
      I've fallen off your lawn, and I can't get up.
    5. Re:It produces performance like C++ by ThePhilips · · Score: 2

      Raw C can be X-able.

      It's just plain PITA to do it.

      Otherwise, performance of the raw C is overrated. Or better: the developers who benefit most from C performance are the ones who can't algorithms. Also, developing reusable algorithms in C is a major PITA.

      --
      All hope abandon ye who enter here.
    6. Re:It produces performance like C++ by harvestsun · · Score: 1

      Oh I dunno, there's the whole ".NET features like garbage collection, generics, and reflection" part. You might have missed it.

    7. Re:It produces performance like C++ by MightyMartian · · Score: 1

      The small amount of your post that even makes sense is absurdly wrong. For fuck's sake, *nix kernels have been implementing complex process and cycle allocation algorithms for four decades now, almost all of it written in C. That's not even talking about various tools in userland that invoke fairly complex logic.

      Christ almighty, what fucking planet do some posters live on?

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    8. Re:It produces performance like C++ by ralphbecket · · Score: 4, Insightful

      "After all, the chief advantages of C# isn't really C#, but the .NET libraries."

      You can't be serious! C is *substantially* lower-level than C#; you should only use C as a portable assembly language. I've spent decades writing assembly, C, and higher level languages and I'd pick C# over C in an eyeblink for anything that doesn't require access to the bare metal (well, personally I'd pick a functional language, but these days I work in industry...)

    9. Re:It produces performance like C++ by PRMan · · Score: 0

      Given the number of unintended buffer overflows I've seen in C programs over the years, apparently so. BTW, I have never seen an unintended buffer overflow problem in C# or Java.

      --
      Peter predicted that you would "deliberately forget" creation 2000 years ago...
    10. Re:It produces performance like C++ by ThePhilips · · Score: 1

      For fuck's sake, *nix kernels have been implementing complex process and cycle allocation algorithms for four decades now, almost all of it written in C.

      LOL. Thanks. As a system developer specializing on Linux, how could I have missed it!? /s

      Seriously though, you might also note that it often took kernels also *decades* to get where they are.

      Most algorithms are very very primitive - because you shouldn't put complex/unpredictable logic into the kernel.

      Lion share of memory allocation is static. There are very few truly dynamic structures. Because kernel may not run out of memory (and kernel address space is often very limited).

      Data structures are primitive - lists and hashes are the pillars - because everything else either has lower memory efficiency or has performance quirks.

      It literally takes years to get it right.

      Otherwise, if you are such a huge fan of C, please show me an implementation of binary tree in C which can be reused to store either `int` or `double` or `void *` data types in it. And no, crapload of preprocessor macros or type casts on every source code line do not cut it.

      That's not even talking about various tools in userland that invoke fairly complex logic.

      You seem to be either inexperienced or undereducated. Because you have missed the elephant in the room:

      Complex logic != complex implementation.

      And it's not like "complexity" has any formal definition.

      Having seen and written plethora of C code in my life, I know well what C is capable of. But still, for any new development it is literally impossible to recommend C over C++.

      --
      All hope abandon ye who enter here.
    11. Re:It produces performance like C++ by innocent_white_lamb · · Score: 1

      Otherwise, if you are such a huge fan of C, please show me an implementation of binary tree in C which can be reused to store either `int` or `double` or `void *` data types in it.
       
      https://developer.gnome.org/glib/2.37/glib-Balanced-Binary-Trees.html

      --
      If you're a zombie and you know it, bite your friend!
    12. Re:It produces performance like C++ by AlphaBro · · Score: 1

      Have you actually taken the time to learn about C# and .NET, or are you just parroting soundbites you heard? C# is a superb language without the help of the (also superb) .NET BCL. Further, you don't have to choose between the two. C++/CLI can be used if you want to work directly with .NET classes from C++. If you want to write raw, .NET-less C/C++ that is invoked from .NET, that is also quite easy with PInvoke. Your myopic view of programming languages is detrimental; few programs are written in a single language these days.

    13. Re:It produces performance like C++ by ebno-10db · · Score: 3, Funny

      I have never seen an unintended buffer overflow problem in C# or Java.

      So you've seen intended ones?

    14. Re:It produces performance like C++ by cbhacking · · Score: 1

      Not to mention handy language features (call it sugar if you want, it makes the coding faster and easier) like LINQ, lambdas, method overloading, and so on.

      --
      There's no place I could be, since I've found Serenity...
    15. Re:It produces performance like C++ by ebno-10db · · Score: 1

      for any new development it is literally impossible to recommend C over C++

      ]
      Your rant makes little sense - almost everyone upthread was talking about C/C++, not just C. They were contrasting C/C++ to things like C# and Java.

    16. Re:It produces performance like C++ by Desler · · Score: 2, Insightful

      You can't be serious! C is *substantially* lower-level than C#; you should only use C as a portable assembly language.

      Why? C is extremely easy to write and has vast amounts of libraries to use.

    17. Re:It produces performance like C++ by narcc · · Score: 1

      for any new development it is literally impossible to recommend C over C++.

      Really? Let's find out:

      For your next project, I strongly recommend that you implement it in C instead of C++.

      Sorry, kid. I've got to side with reality on this one...

    18. Re:It produces performance like C++ by Anonymous Coward · · Score: 0

      You kids with your fancy C. Hand-tuned assembly is faster and therefore better right?

    19. Re:It produces performance like C++ by Anonymous Coward · · Score: 0

      No! Somewhere a CPU cycle might be "wasted" doing silly things like bounds-checking! Think of the precious cycles!

    20. Re:It produces performance like C++ by Anonymous Coward · · Score: 0

      Actually the ability to 'just use' C++ libraries in C# is a vastly under appreciated feature of C# Other under appreciated feature is stack allocation.

      If you have the need for speed you can either use a C++ library to do the heavy work. Or allocate structures on the stack.

    21. Re:It produces performance like C++ by jma05 · · Score: 0

      > Why?

      He just told you. It is a "*substantially* lower-level than C#".

      There is a reason why people use C to write nearly every other language: To bring the programming language semantics closer to the semantics of the solution space. This is programming languages 101 and is covered in any intro to programming languages course.

      C is easy to learn (not much to learn), but is tiedious (low-level) and unsafe (unmanaged) to work with because it has fewer abstractions and memory needs to be programmer managed (programmer costs are premium in most projects, not silicon costs). Its a great language when control over memory matters (a minority of projects or sub-projects). Its not a productive language for anything else. Ideally, one writes most of the code in an appropriate high-level programming language, profiles and identifies bottle necks and considers whether tuning them in the more tiedious and unsafe C code is worth while. Nearly all programming languages provide an FFI of some sort for this.

      > has vast amounts of libraries to use.

      Most of those libraries also tend to be low-level.

    22. Re:It produces performance like C++ by fnj · · Score: 1

      Then again, you could just pick full C++ 11, which has the advantages of both the higher level of abstractions like C#, and the low level capabilities of C.

      Anticipating the "but ... but ... it doesn't have garbage collection" - correct; it's not for brain dead idiots who can't program with proper technique and have to have something "managing" their code.

    23. Re:It produces performance like C++ by phayes · · Score: 1

      I have never seen an unintended buffer overflow problem in C# or Java.

      So you've seen intended ones?

      Yup, exploit code is full of em...

      --
      Democracy is a sheep and two wolves deciding what to have for lunch. Freedom is a well armed sheep contesting the issue
    24. Re:It produces performance like C++ by ThePhilips · · Score: 1

      It can't use an `int` as a key or value - it operated on pointers to something abstract. Meaning that not only that something has to be dynamically allocated, but that if it is small - like `int` or even `long` - the overhead of dynamic memory would (typically) quadruple memory consumption. Which is clearly why things like glib aren't used in kernel space.

      --
      All hope abandon ye who enter here.
    25. Re:It produces performance like C++ by Anonymous Coward · · Score: 0

      True dat. They simply run out of memory parsing the massive XML files that Java boys use to pretend they have an "interface" to their random piece of enterprise shit.

    26. Re:It produces performance like C++ by Anonymous Coward · · Score: 0

      Probably because the buffer overflows exist in the VM or interpreter of the bytecode or buried in a library somewhere rather than the code the app writer writes, which is why java security updates and .net security updates appear so frequently.

      I'm sure djitska complained about this during the rise of object oriented languages where abstraction became the methodology. I can't count how many times I've seen the same algorithm implemented within an object which uses another object that also implements the exact same algorithm, probably because they never checked or couldn't see the source. So much for code re-use. Good code can get re-implimented badly and bad bug ridden code can get re-used bacause it's hidden away somewhere.

      Personally I start off with outlining the code in C. If it becomes obvious that there is an inheritance tree to works with, I'll upgrade to C++, and save on writing a load of boiler plate, if there is an algorithm that gets applied to a lot of differing objects, i'll add a bit of stl, each time I need a higher abstraction level I'll check if there is a sensible library I can use.
      What I don't do is rely on the same old library to do all the heavy lifting for me from the get go when I do this (sometimes with QT or some other big library) at some stage I'll find a bug that can't be fixed or some other incompatibility and I'll end up wrapping a broken library with an api that avoids the bug. ie the bug is still present just unused.

    27. Re:It produces performance like C++ by serviscope_minor · · Score: 1

      Your rant makes little sense - almost everyone upthread was talking about C/C++, not just C.

      Which, in itself, makes little sense. Actually programming in C++ is vastly different from programming in C. In fact the main criticisms of C (low level, tedious, error-prone by hand resource management, unsage contstructs etc...) can almost entirely be avoided in C++ with no performance penalty. In fact often with a performance gain.

      --
      SJW n. One who posts facts.
    28. Re:It produces performance like C++ by jma05 · · Score: 1

      > Anticipating the "but ... but ... it doesn't have garbage collection" - correct; it's not for brain dead idiots who can't program with proper technique and have to have something "managing" their code.

      C++11 is an improvement. But wanting a GC has nothing to do with "brain dead idiots". It has been established decades ago that manual memory management is simply prone to errors, as program size increases. That includes expert programmers. This is a settled empirical question. If the overhead is acceptable, there is little reason to not want a GC.

      But hey, if you want to feel smart, just because you use an unmanaged programming language and be condescending to the rest, I won't stop you.

    29. Re:It produces performance like C++ by TangoMargarine · · Score: 1

      This has led to some interesting consequences. For instance, when the Editors of the Guide were sued by the families of those who had died as a result of taking the entry on the planet Tralal literally (it said "Ravenous Bugblatter Beasts often make a very good meal for visiting tourists: instead of "Ravenous Bugblatter Beasts often make a very good meal of visiting tourists"), they claimed that the first version of the sentence was the more aesthetically pleasing, summoned a qualified poet to testify under oath that beauty was truth, truth beauty and hoped thereby to prove that the guilty party in this case was Life itself for failing to be either beautiful or true. The judges concurred, and in a moving speech held that Life itself was in contempt of court, and duly confiscated it from all those there present before going off to enjoy a pleasant evening's ultragolf.

      --
      Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
    30. Re:It produces performance like C++ by rdnetto · · Score: 1

      Then again, you could just pick full C++ 11, which has the advantages of both the higher level of abstractions like C#, and the low level capabilities of C.

      Speaking as someone who has worked with both C++11 and C#, C# is a much nicer language. C++11 improves things somewhat, but it's an old language and the cruft shows. The obvious example is generics: C#'s generics are quite straightforward to use, support constraints (base classes of type parameters), and can even be annotated to handle inheritance correctly. C++'s templates are notorious for their poor usability, to the extent that even Stroustrup recognizes that they fall short. A future version of C++ is supposed to implement Concepts, which provide the ability to add arbitrary constraints to type parameters (but not by using inheritance*, for some reason.)

      It's quite telling that even though I've been using Linux as my primary OS for a few years now, I still haven't found a language that's as pleasant to use on it as C# was under Windows. (Qt is much nicer than the .NET Framework though.)

      *To be fair, inheritance has the problem that once a class is written, you can no longer add base classes to it. But this is not insurpassable; C# supports extension methods that could be used to fix this in a manner similar to Haskell's type classes.

      --
      Most human behaviour can be explained in terms of identity.
    31. Re:It produces performance like C++ by rdnetto · · Score: 1

      But wanting a GC has nothing to do with "brain dead idiots". It has been established decades ago that manual memory management is simply prone to errors, as program size increases. That includes expert programmers. This is a settled empirical question. If the overhead is acceptable, there is little reason to not want a GC.

      There is also a third option: manual memory management with compile-time guarantees of safety. You get the performance of manual memory management without the risks, and the code ends up being more concise because heap allocation is implemented as a syntax feature. Rust is the most well known example of this.

      --
      Most human behaviour can be explained in terms of identity.
    32. Re:It produces performance like C++ by jma05 · · Score: 1

      All fine options - whether they are compile-time or runtime-time safety checks. The basic principle is - don't rely on humans not to make mistakes, especially as system complexity increases. They will eventually. That's just being human.

      Functional programming languages make code less error prone. Certain unmanaged frameworks... VCL/LCL (Delphi/Lazarus), Qt etc. make memory leaks less easy to make, static analyzers warn of common lapses... anything to make code more safe is fine. The whole point of a good programming language/tool is about making the language fit the programmer mind, not the CPU. Its the compiler's headache to make optimized instructions from it.

      Calling people stupid, as the GP did, because they occasionally make mistakes (especially when the system adds additional cognitive burdens), whether they are programmers or lay users, is just being naive. It is the duty of system designers to anticipate mistakes and elegantly encapsulate complexity; rather than blaming users for misusing their unintuitive designs.

  14. So when is MS Office going to be built with .NET? by Anonymous Coward · · Score: 1, Insightful

    I believe MS Office is built using Visual C++.
    Microsoft were unable to use .NET to build their own applications, presumably because of poor performance.
    Microsoft have failed to eat their own dog food.

    If MIcrosoft .NET was successful, then WindowsRT on an ARM CPU would have not been a failure.
    If .NET was implemented properly, all applications compiled with Microsoft VIsual Studio should have produced exes/dlls with both native x86 and .net (fat binaries).
    Then all existing Windows Apps would run on the ARM CPU (admittedly a bit slower). .NET has clearly failed.

  15. now if only by Anonymous Coward · · Score: 0

    it ran on linux.

  16. What about number-crunching performance? by Theovon · · Score: 2

    I skimmed over the links, but I probably just missed it. So apps take 60% less time to start, and they use 15% less memory. What about run-time performance? How much faster are they when executing?

    1. Re:What about number-crunching performance? by benjymouse · · Score: 2

      I skimmed over the links, but I probably just missed it. So apps take 60% less time to start, and they use 15% less memory. What about run-time performance? How much faster are they when executing?

      During runtime, a.NET already runs compiled. This saves on the JIT compiler.

      However, they also announced (later session at /Build//) that the new compilers (including the JITs) will take advantage of SIMD. For some application types this can allegedly lead to serious (like in 60%) performance gains. Games were mentioned.

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    2. Re:What about number-crunching performance? by PRMan · · Score: 1

      This only helps the first load. After that, either one should be the same if the JIT is worth anything.

      --
      Peter predicted that you would "deliberately forget" creation 2000 years ago...
    3. Re:What about number-crunching performance? by cbhacking · · Score: 2

      Well, that depends. JIT needs to be *really* fast. That limits the optimization it can do. Pre-compilation to native allows more processing time for optimizations between the CIL and the machine code than a JIT can really afford.

      --
      There's no place I could be, since I've found Serenity...
    4. Re:What about number-crunching performance? by Theovon · · Score: 0

      That’s MY point. Plus, if the .NET JIT is anything like the JVM, only hotspots get compiled, while the rest are interpreted. (If you only run a piece of code once, it may be faster to interpret it than to compile and then run it.)

    5. Re:What about number-crunching performance? by shutdown+-p+now · · Score: 1

      .NET JIT always compiles, it doesn't have a bytecode interpreter at all. That's why it has to be faster than Java's, and why it doesn't optimize as well.

  17. APRIL FOOLS! by Cammi · · Score: 0

    This must be april fools. If they claim it is a .net compiler, but only supports 1% of .net (aka, windows store apps), then this IS APRIL FOOLS!

    1. Re:APRIL FOOLS! by Anonymous Coward · · Score: 1

      That's where the "preview" part comes in.

  18. Re:Ah... by fyngyrz · · Score: 1

    You can stop pretending that our multicore processors with 64 gigs of ram can't handle them.

    ...and perhaps you can stop pretending that HLL bloatware has anywhere near the performance of hand coded apps *on the same CPU*. It has nothing to do with GUI's per se, either. It's about frameworks with years and years of bloat, slow code in black boxes that can't be sped up (or often even bugfixed, as we have sadly come to learn), about ridiculous amounts of memory getting chewed up by library after library, about swapping instead of careful memory use... please don't pretend that faster CPUs have addressed the performance issues of higher (and higher) level approaches. The bottom line is still that well crafted apps that eschew OO approaches will almost always outperform for both memory use and speed, given the same environment to run in.

    --
    I've fallen off your lawn, and I can't get up.
  19. Is JITC finally going to die? by IamTheRealMike · · Score: 3, Insightful

    Many years ago there was an R&D project inside a large tech company. It was exploring many of the hot research topics of the day, topics like mobile code, type based security, distributed computing and just in time compilation using "virtual machines". This project became Java.

    Were all these ideas actually good? Arguably, no. Mobile code turned out to be harder to do securely than anyone had imagined, to the extent that all attempts to sandbox malicious programs of any complexity have repeatedly failed. Integrating distributed computing into the core of an OO language invariably caused problems due to the super leaky abstraction, for instance, normal languages typically have no way to impose a deadline on a method call written in the standard manner.

    Just in time compilation was perhaps one of the worst ideas of all. Take a complex memory and CPU intensive program, like an optimising compiler, and run it over and over again on cheap consumer hardware? Throw away the results each time the user quits and do it all again when they next start it up? Brilliant, sounds like just the thing we all need!

    But unfortunately the obvious conceptual problems with just in time compilers did not kill Java's love for it, because writing them was kind of fun and hey, Sun wasn't going to make any major changes in Java's direction after launch - that might imply it was imperfect, or that they made a mistake. And it was successful despite JITC. So when Microsoft decided to clone Java, they wanted to copy a formula that worked, and the JITC concept came along for the ride.

    Now, many years later, people are starting to realise that perhaps this wasn't such a great idea after all. .NET Native sounds like a great thing, except it's also an obvious thing that should have been the way .NET worked right from the start. Android is also moving to a hybrid "compile to native at install time" model with the new ART runtime, but at least Android has the excuse that they wanted to optimise for memory and a slow interpreter seemed like the best way to do that. The .NET and Java guys have no such excuses.

    1. Re:Is JITC finally going to die? by MightyMartian · · Score: 1

      That's rather a bizarre claim, considering i and p code has been around for decades, and virtual machines have been around as long. There's nothing particularly unique about Java (or .NET for that matter).

      --
      The world's burning. Moped Jesus spotted on I50. Details at 11.
    2. Re:Is JITC finally going to die? by Anonymous Coward · · Score: 0

      He was specifically talking about a JIT compiler using a virtual machine. They weren't saying that virtual machines were something new with Java.

    3. Re:Is JITC finally going to die? by aberglas · · Score: 5, Informative
      You miss the point entirely. The vast majority of CPU time in most applications is spent in a relatively few leaf subroutines. What the JIT does is just compile those bits that are found to be CPU intensive.

      In tests I had done some time ago with the early compilers, .Net code was actually faster than C implementing the same algorithm. The reason is that it can perform global optimizations, in-lining aggressively. Sure that can be done with C (and you do not even need macros), but it takes extra work, slows down the compiler if too much is put into header files, and programmers usually miss some of the routines that need in-lining.

      Modern generational garbage collectors are also faster than malloc/free, and do not suffer fragmentation.

      Delaying compilation makes it architecture neutral, same distro for 32, 64bit, ARM etc. What is needed is to cache the results of previous compiles which causes a slight but usually negligible start up penalty.

      Compiling all the way to machine code at build time is an archaic C-grade idea that became obsolete thirty years ago for most common applications.

    4. Re:Is JITC finally going to die? by Anonymous Coward · · Score: 0

      Is JITC finally going to die?

      No. JavaScript is everywhere.

    5. Re:Is JITC finally going to die? by shutdown+-p+now · · Score: 2

      Dynamically compiling code has some advantages unrelated to security or portability. For example, try efficiently implementing generic virtual methods without a JIT.

      (Coincidentally, .NET Native doesn't support this feature of C#)

    6. Re:Is JITC finally going to die? by windwalkr · · Score: 1

      You make some good points, however:

      The reason is that it can perform global optimizations, in-lining aggressively.

      So can all semi-modern C++ compilers. This is a compiler technology, not a language concern.

      Modern generational garbage collectors are also faster than malloc/free, and do not suffer fragmentation.

      Perhaps true, but this ignores the fact that C++ can effectively bypass heap allocation completely for programmer-defined hot spots. Sure, this pushes the optimisation work on to the programmer rather than the compiler, but it still means a significant performance win. Java can't do this to anything like the same degree.

    7. Re:Is JITC finally going to die? by aberglas · · Score: 1

      I don't see how C++ can do global opts. The idea that programs are compiled one file at a time is burnt into C's soul. Within the same source code file certainly, but between files, and between library archives seems impossible without fundamentally changing the way builds work.

      Just because .Net/Java etc make garbage collection easy does not necessarily mean that you need to do a lot of it. You can use the same techniques as C to optimize, although reusing objects is generally frowned upon as error prone. Long ago I used a real time system in Lisp that did zero CONS (mallocs) after initialization, worked fine.

      That said, .Net/Java programmers tend to be sloppy about producing lots of garbage. Java has an idiot design that makes Strings (the most common object typically allocated) two objects instead of one.

      P.S. with this arcaic /. editor is it really necessary to put /P P between each paragraph?!

    8. Re:Is JITC finally going to die? by serviscope_minor · · Score: 1

      The reason is that it can perform global optimizations, in-lining aggressively. Sure that can be done with C (and you do not even need macros), but it takes extra work, slows down the compiler if too much is put into header files, and programmers usually miss some of the routines that need in-lining.

      Modern static compilers have been advancing too. Automatic inlining is now very well established. With link time optimization, this even happens across translation units.

      Modern generational garbage collectors are also faster than malloc/free, and do not suffer fragmentation.

      This is a frequent, but misleading comparison. The reason it's misleading is that C, C++ and Fortran have two allocators, not one. The second, and more commonly used allocator is the stack which is completely free: it simply involves bumping the stack pointer by a larger amount on function entry. Escape analysis is not perfect and will never be as good since it's competing with perfect knowledge.

      You can now easily write high level C++ code which does not perform *any* heap allocations in the inner loop. Free always beats cheap.

      Secondly, GC has a roughly 2x overhead required in memory use in order to not spend all the CPU time on doing the GC (this has been studied, I can't find the paper off hand). The extra memory use will hurt CPU cache performance, too.

      Compiling all the way to machine code at build time is an archaic C-grade idea that became obsolete thirty years ago for most common applications.

      Obsolete --- I do not think that means what you think it means. It's still in wide use and higher performance than the alternative. That's not obsolete.

      --
      SJW n. One who posts facts.
    9. Re:Is JITC finally going to die? by gbjbaanb · · Score: 1

      .NET Native sounds like a great thing, except it's also an obvious thing that should have been the way .NET worked right from the start.

      amen, and then they might ave done something like RIAA instead of garbage collection so we wouldn't have to suffer IDispose and using statements and try/finally statements to get object lifetime cleanup correct.

      However, I think they could have spent all that effort they spent making .NET, C# and VB.NET IDE, compiler, runtime and all the other supporting stuff, and simply have made the tool support for C++ much better. Generally C# is a good language solely because Visual Studio makes it easy to code in it (hints, wizards,snippets, code completions, intellisense, object browser etc). If it wasn't for all those tools, C# would be just another language. God knows its got enough niggles and anti-features to not stand up on its own without the massive investment in tooling Microsoft gave it.

    10. Re:Is JITC finally going to die? by gbjbaanb · · Score: 1

      Global optimisation has been in VC++ for years.

      Most people don't care that it works - you pass source and libs to the 'compile suite' and it does its magic in some black-box kind of way. As long as you get a binary at the end, you're happy,

      See the msdn blog for more info

    11. Re:Is JITC finally going to die? by AmiMoJo · · Score: 1

      Most JIT compilers are not actually JIT though. For example both .NET and Android pre-compile the code when the app is installed or run the first time, and then cache that result. That's why when you upgrade Android it re-compiles all the caches apps with the latest version of the JIT compiler.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    12. Re:Is JITC finally going to die? by Daniel+Hoffmann · · Score: 1

      I always thought that JITC was meant for making code portable. The runtime (openjdk, oraclejdk, yourmomsjdk, etc) may or may not JITC at runtime, it is up to the runtime. The code written for a VM is itself portable to all VMs that conform to the spec.

      This is all fine for Java, but C# only runs in Windows and it only has a single runtime (I don't think microsoft cares about Mono much), which kinda makes this point moot. On the other hand ARM windows phones are taking off...

    13. Re:Is JITC finally going to die? by alexo · · Score: 1

      and then they might ave done something like RIAA instead of garbage collection

      Hell no!
      I'm OK with RAII, though.

    14. Re:Is JITC finally going to die? by aberglas · · Score: 1

      Um, what makes you think that Java/.Net do not use the stack? Indeed since Java 1.6 doing a "new" will actually allocate on the stack if possible. Remember that Java does not allow crazy pointer arithmetic, so it can tell how objects are referenced, and does a lot of inlining.

      One other trick that Java can do that C cannot (without a lot of effort) is store 36 bit long long aligned pointers in 32 bit fields. That makes them very memory efficient for heap sizes up to 64 gig, which is still very large by today's standards.

      One thing that .Net can do that C cannot is detect integer overflow with negligible run time overhead. On occasion that has saved me a lot of pain. Its the sort of thing that keeps C programmers up late at night debugging.

      The cowboy nature of C enabling things like ptr++ actually makes it difficult for compilers to optimize fully.

      C is still widely used in the sense that oxen are still widely used to plough fields. They work, but take a lot more effort.

    15. Re:Is JITC finally going to die? by aberglas · · Score: 1

      Any C programmer that does not really care about how builds work are not going to be developing substantial applications very long!

      There are a log of subtlies about what happens when shared dependent modules are updated, and you had better be aware of how the compiler optimizes them.

      Yes, it can be made to work, but it cannot just be a black box.

    16. Re:Is JITC finally going to die? by serviscope_minor · · Score: 1

      Um, what makes you think that Java/.Net do not use the stack? Indeed since Java 1.6 doing a "new" will actually allocate on the stack if possible.

      Let you reply to you with my original post:

      Escape analysis is not perfect and will never be as good since it's competing with perfect knowledge.

      --
      SJW n. One who posts facts.
    17. Re:Is JITC finally going to die? by gbjbaanb · · Score: 1

      and don';t forget that the GC may not fragment like the standard malloc-style heap does, but to achieve this it has to compact the heap regularly. Note that we have generational GCs - because compaction is so expensive, they "split" the GC heap into sections and only compact parts of it.

      If you want to waste memory, you can use fixed-block pool allocators that do not suffer fragmentation, so C++ gives you even more of a benefit over GCs.

  20. Re:So when is MS Office going to be built with .NE by ThePhilips · · Score: 2

    Microsoft were unable to use .NET to build their own applications, presumably because of poor performance.

    Unlikely. MSO is very old. Very likely the source code is poorly documented and not completely understood. Porting that to anything is going to be a major and very risky undertaking.

    .NET has clearly failed.

    Still clearly better than VB.

    --
    All hope abandon ye who enter here.
  21. Re:Thanks, but.... by Anonymous Coward · · Score: 0

    But muh metro fart app loads 60% faster!!

  22. Re:That's terrible. by gargleblast · · Score: 0

    I both work for MS and read Slashdot

    That's quite OK. Just say three Hail Marys and a P.S. Fuck Beta.

  23. Re:So when is MS Office going to be built with .NE by PRMan · · Score: 1

    No, what failed was coming up with RT instead of just using .Net (and by that for ARM I mean Mono) to begin with.

    --
    Peter predicted that you would "deliberately forget" creation 2000 years ago...
  24. Re:Thanks, but.... by Anonymous Coward · · Score: 0

    Lies! The Metrosexual UI is the greatest thing ever!

  25. Re:Thanks, but.... by Anonymous Coward · · Score: 0

    Why is this modded down? Nobody gives a shit about Metro apps running faster -- nobody is writing those nor wants to. Everybody is doing Windows/WPF apps and such. Hell, more command line tools get written in C# than Metro apps. I'll be very excited when this compiler works on real-life software (never?).

  26. Re:Ah... by Anonymous Coward · · Score: 0

    You can install .Net from scratch in under 5 minutes. Try again

  27. Re:Ah... by Anonymous Coward · · Score: 0

    When installing a security update for .NET takes 45 minutes, there is no pretending involved.

    I think it's pretty clear that it taking 45 minutes *is* pretending, that simply does not happen.

  28. This is highly disappointing by Anonymous Coward · · Score: 0

    I was hoping that Microsoft was finally starting to die as part of karma for all the bullshit they've done (and continue to do, just more quietly), but it seems this Satya Nadella fellow's new direction for the company is going to result in a new generation of Microsofties that think Microsoft's way is the best/only way and put the foot down on alternatives. C# sounds like a good language, but no-one here uses it and I'm concerned that Microsoft's influence is going to push towards areas that they have no business being in.

    That plus the start menu in Windows 8 coming back means Linux will no longer seem like a necessary conversion for many people anymore, plus Office on the iPad and presumably Android in the near future (for free) will result in LibreOffice having almost no users and hence Microsoft will continue to rein surpreme due to dumbfucks who don't know anything about their history!

    I have corporations sometimes - the bad ones just won't fucking DIE!

  29. Re:So when is MS Office going to be built with .NE by cbhacking · · Score: 1

    No need to use Mono for ARM. .NET has been supported on numerous architectures, including ARM, as part of Windows CE for years. Sure, it was only a subset of the full framework, but not for any technical reason except keeping the footprint small.

    WinRT (not to be confused with Windows RT; we're talking about the API set now) does often feel like a waste of effort to me, although there is something to be said for identifying/creating a sandbox-friendly set of APIs to use in creating sandboxed software...

    --
    There's no place I could be, since I've found Serenity...
  30. Re:Thanks, but.... by AaronLS · · Score: 1

    I agree with the essence of the statement, but it's written in terms of childish absolutes such as "nobody" that obviously isn't true. Maybe if he had said "The majority of .NET developers aren't doing metro. When you expand support for this feature, then it'll be interesting to the rest of us." But some people live in a world that revolves around them and cry when they get left out. I hope this feature comes to the rest of the .NET platform, but I'm not going to cry about it.

  31. Re:Ah... by Anonymous Coward · · Score: 0

    I have a Core 2 Duo computer from 2007 and it takes like 5 minutes tops. PEBCAK.

  32. Re:Thanks, but.... by Anonymous Coward · · Score: 0

    But no one is writing Metrosexual UI apps. That's why Microsoft is having to bundle websites as apps to inflate their app store numbers.

  33. Re:Ah... by cavreader · · Score: 2

    Memory and CPU power are there to be used so why not take advantage of it. And what the hell is a hand coded app? Or are you referring to programming against a runtime versus programming directly against the OS? And what does eschewing OO approaches mean? Are you talking about an application that encapsulates all it's functionalities without referencing any external resources or dependencies?

  34. More like JITC goes to the cloud by Anonymous Coward · · Score: 0

    Quote from the article:

    You continue to upload MSIL app packages to the Windows Store. Our compiler in the cloud compiles the app using .NET Native in the Store, creating a self-contained app package that’s customized to the device where the app will be installed.

    So it still uses JIT during the development process, only now the NGEN optimization process occurs in the cloud instead of locally.

  35. Re:Ah... by Anonymous Coward · · Score: 0

    Memory and CPU power are there to be used so why not take advantage of it.

    We would like to, but the VMs are stealing away precious CPU time and RAM that could be used for better application performance.

  36. Re:Ah... by gonnagetya · · Score: 1

    Depends on the hardware. In any case I've noticed that the .NET updates in Windows Update seem to always take the longest to complete out of all the various updates that can appear, so despite they hyperbole there is some truth to what he said.

  37. Re:Thanks, but.... by viperidaenz · · Score: 1

    Maybe because the plan is to support all of .net.

    is expected to apply to more .NET applications in the long term

    I assume it was easier to only support the reduced API of metro apps to start with.

  38. Re:Ah... by Anonymous Coward · · Score: 0

    Nobody is pretending, the fact is that in the vast majority of cases saving 5ms while expending 5 times the development effort due to NIH syndrome because you don't want to use pre-existing libraries and creating a huge amount of additional maintenance work is simply not worth it. You could write everything in assembly if you wanted to and with careful optimization you could probably produce faster code but it would take several orders of magnitude faster to do.

    It boggles the mind that people *still* use the term "bloated" simply because they are utilizing frameworks that might not be limited to just the exact set of things you need, having the additional functionality rarely produces noticeable performance issues.

  39. Re:Ah... by viperidaenz · · Score: 1

    Would you rather they didn't update the assembly cache when they install an update? So your applications have to wait for their dependencies to be updated while they start?

  40. What bunk.... by Anonymous Coward · · Score: 0

    Sorry, but citation needed. .NET during execution is always native code running against the CPU. The executable is a packed intermediate language that gets cross-compiled to your systems native instruction set when it's run - and for signed libraries, they get stored in a global assembly cache and you don't pay that hit each run. That doesn't mean it's interpreted, it just means the last yard of the compilation is done on your computer.

    The closest you'll get to interpreted .NET code is PowerShell. The only bit of your post that's remotely correct is the dependency on the runtime libraries - but that's the same with C++ - and you'll find a lot of people pack that C++ runtime libraries they need with their installers, just to be on the safe-side.

    -Steve

    1. Re:What bunk.... by TMYates · · Score: 1

      All code ends up at one point or another as native code running against the CPU. There may be several stages before it ends up in native code. Interpreters take the code and convert it into instructions the CPU understands on the fly. The fact that .NET gets converted into CIL means that it should be at least partially interpreted. The JIT compiler is the last step that compiles it into native code for the CPU, but this happens before the code block executes. Now, there are technically ways of using the .NET NGEN tool to pre-compile for the system the code sits on, but until it hits the JIT compiler it might as well be an interpreted language (i.e. C# to CIL). This is why they are just now announcing this native compilation tool where it takes out the CIL step completely. Because .NET currently needs to first be converted into byte code before hitting a compiler, I say that it makes perfect sense that it can be considered interpreted at least to the point of the JIT. If my definition of an interpreted language is wrong then I accept that I am wrong. Most of my beliefs on this stance I would base off of the ECMA-335 specification.

  41. Re:Ah... by Anonymous Coward · · Score: 0

    Two possibilities:

    1. You're actually taking about the bug in Windows Update, where patch depth exponentially increases the processing time. There was a /. story a few months ago about this causing multi-hour updates on Windows XP. For most people, the problem goes away if you update Internet Explorer to the latest version first, and then install ALL updates for ALL products. (Note: The bug is not specific to Windows XP; it just has the longest patch chains.)

    2. This may also be because most Microsoft installers have an ugly cut-and-paste habit of launching a new CLR process to run a single line of code. When I worked at Microsoft, our dinky little installer did this hundreds of times. It was disgusting, but management tolerated it because the install only took a few minutes (instead of a few seconds like it should have).

  42. Re:Ah... by fyngyrz · · Score: 1

    Memory and CPU power are there to be used so why not take advantage of it

    1) if my app is careful with memory, you have more left to do other things with, and there's less swapping, etc.

    2) if my app is 10x faster than yours (and it probably is at least that), I *am* taking advantage of the CPU, in fact, better than you are.

    And what the hell is a hand coded app?

    It's an app where you write the code, instead of bringing in a bunch of black boxes. So that A, you can control exactly what is going on, and B, you can fix any bug that arises without having to go to whomever (Apple, MS, Some Random Dude) and beg them to fix their black box. It takes more time to write -- a lot more -- but it results in a much higher quality, easier to maintain software product.

    And what does eschewing OO approaches mean?

    It means just what it says. No black boxes. No compilers that build in overhead with every call and every method, basically nothing that will turn what should be a megabyte of clean code into 100 mb of utter dreck.

    I'm not talking about objects in the sense of (for instance) a structure containing slots for various methods appropriate to the concept that the structure implements; that kind of "object" has been around since prehistoric days. I used to code like that in ASM for the 6809. I'm talking about HLL cruft, basically.

    Are you talking about an application that encapsulates all it's functionalities without referencing any external resources or dependencies?

    As much as is possible to do so, yes. It's the difference between crafting something of your own, something you can service at any level, and something built from Other People's Code, often code you have no control over and/or no knowledge of how it actually works.

    AFAIC, someone is capable of real programming when they can write anything they need. And when you can, you should. Because it results in higher quality, more maintainable, faster, leaner products.

    --
    I've fallen off your lawn, and I can't get up.
  43. Re:Ah... by fyngyrz · · Score: 4, Insightful

    You could write everything in assembly if you wanted to and with careful optimization you could probably produce faster code but it would take several orders of magnitude faster to do.

    No. You can't do that unless the platform is locked down hardware wise, and that's not been the case with the major OS's for quite some time now. The best tool -- to date -- for anything serious aimed at a major OS is c. By far. Not C++. not objective c, not C#, not asm ... just c.

    due to NIH syndrome

    No. That's not it at all. I don't care where it was invented; that's a symptom, not the actual problem. The problem is bringing in other people's code results in a loss of maintainability, quite often a loss of focus on the precise problem one is attempting to address, a loss of understanding of exactly what is going on, which in turn leads to other bugs and performance shortcomings. OPC comes into play at multiple levels: attempts to manage memory for you; libraries; canned packages of every type and "handy" language features that hide the details from you. NIH because it wasn't you just *looks* like the problem, but the problem is what NIH code actually does to the end result, and that's a real thing, not a matter of I don't like your style, or some personality syndrome. If the goal is the highest possible quality, then the job has to be fully understood and carefully crafted from components you can service from start to finish, the only exceptions being where it *must* interface with the host OS. Even then you're likely to get screwed. Need UDP ports to work right? Stay away from OSX. Need file dialogs to handle complex selections? MS's were broken for at least a decade straight. Need font routines that rotate consistently? Windows would give it to you various ways depending on the platform. And so on. Better off to write your own code if you can possibly manage it. You know, so it'll work, and if your customer finds an error, so you can fix it instead of punting it into Apple or MS's lap.

    It boggles the mind that people *still* use the term "bloated" simply because they are utilizing frameworks that might not be limited to just the exact set of things you need

    I use "bloated" when my version of something is 1 mb, and a friend's, with fewer lines of code, is 50 mb and runs the target functionality at a fraction of the speed, not to mention loading differences and startup differences. It's not just about a library routine that isn't called (well, until there are a lot of them, or if they're very large... linkers really ought to toss those out anyway), it's primarily about waste in every function call, clumsy memory management that tries to be everything to everybody and ends up causing hiccups and brain farts at random times, libraries that bring in other libraries that bring in other libraries until you've got a house of a thousand bricks, where you only actually laid a few of them, and you have *no idea* of the integrity of the remaining structure. Code like that is largely out of your control. Bloated. Unmaintainable. Opaque. Unfriendly to concurrently running tasks.

    Look at your average iOS application. 20 megs. 50 megs. Or more. For the most simpleminded shite you ever saw; could have been implemented in 32k of good code and (maybe) a couple megs of image objects. That's what I'm talking about, right there. Bloat. It's that zone where a craft is swamped by clumsy apprentices who think they understand a lot more than they do. Where one fellow creates beautiful, strong, custom furniture, and the other guy buys a 59.95 box from IKEA and turns a few cams. The good news is that there will always be a place for those who can really craft, because there's a never-ending source of challenges where crap just won't do. And despite rumors to the contrary, end users do know the difference -- especially once they've been exposed to both sides of the coin.

    --
    I've fallen off your lawn, and I can't get up.
  44. Re:Ah... by non0score · · Score: 1

    While I agree with you on most points, I don't think the last sentence is warranted -- because people aren't perfect. Just because you can write a piece of code doesn't mean you should. 1) If the problem has been solved exactly like you wanted, and the resulting code has 5 years of bug fixing associated with it, it's probably a good idea to use it (contrived e.g. are you going to rewrite Linux?). 2) Why waste time solving a problem that's already been solved by someone else (assuming it aligns with your specs). Your job is to solve problems, not write code -- computer/code is there to help you solve problems. 3) If you launch a product on the internet with, say, a privacy bug because you wrote that piece of code yourself...well, your company may not be around long enough to fix that bug.

  45. Re:Ah... by Anonymous Coward · · Score: 0

    If the goal is the highest possible quality, then the job has to be fully understood and carefully crafted from components you can service from start to finish, the only exceptions being where it *must* interface with the host OS. Even then you're likely to get screwed. Need UDP ports to work right? Stay away from OSX. Need file dialogs to handle complex selections? MS's were broken for at least a decade straight. Need font routines that rotate consistently? Windows would give it to you various ways depending on the platform. And so on. Better off to write your own code if you can possibly manage it.

    and that is the fantasy of people who dont actually have to deal with the real world and get things out to people in any kind of timely manner.

    I use "bloated" when my version of something is 1 mb, and a friend's, with fewer lines of code, is 50 mb and runs the target functionality at a fraction of the speed, not to mention loading differences and startup differences.

    example? you could change those numbers by several orders of magnitude and would make you look even better! those are just random numbers and could be for anything. If the numbers are real and you are comparing actual useful applications then maybe you would have a point but that just looks like random unsubstantiated numbers.

    Look at your average iOS application. 20 megs. 50 megs. Or more.

    pfft..thats application data, even the ios version of minecraft is only a few megabytes and im sure youll claim its "bloated" and you could do in 32k or some more unsubstantiated bullshit. i love demoscene but the reality is that when you want a functioning, extensible, maintainable codebase that you can implement in an acceptable amount of time you arent reducing everything to the tiniest footprint possible.

    your whole thing is just one big rant, show us some evidence, some real-world code that actually proves your theory.

  46. Re:So when is MS Office going to be built with .NE by shutdown+-p+now · · Score: 2

    .NET apps compiled for "AnyCPU" will, technically, run just fine on Windows RT on ARM. The reason why you can't actually run such desktop apps is because it is blocked by signature verifier (any desktop app must be signed by MS to run on RT). It's a DRM thing, not a technical limitation.

    Oh, and huge parts of Office use .NET these days, alongside the older native code. Ditto for VS, and many other products.

  47. Re:Ah... by symbolset · · Score: 1

    When your app is going to be used by a billion people, potentially dozens of times a day, every extra millisecond it takes to load costs a man year. Every extra K it consumes costs a terabyte. You should pretend your work will be so popular if you want it to be so popular.

    --
    Help stamp out iliturcy.
  48. Re:Ah... by maevius · · Score: 1

    I'm known to be a low level person and professionally a C programmer. And I agree with you on some stuff.

    However...

    No, I won't use C to do something in 1k memory and 3 weeks of coding, I will use python in 10mb memory and 1 day of coding. Simply because my time costs more than 10mb of memory. So stop demonising higher level languages and accept that they have their perfectly legit uses as long as their limitations are undestood. Keep in mind that if android used C and not java, we would have about 5 non crashing apps tops in the market.

    Sooo, yeah...

  49. Awesome? RT? by man_ls · · Score: 1

    Is this a prelude to allowing compiled desktop applications on Windows RT? Without the CLR overhead, perhaps the ARM would be competitive with an entry-level Intel laptop?

    1. Re:Awesome? RT? by cbhacking · · Score: 1

      It's already completely possible to run native or managed desktop apps on RT. You just need to "jailbreak" it first to remove the signature enforcement on user-mode full-trust binaries. RT 8.0 has been jailbroken since like a year ago...

      The jailbreak for RT 8.1 is in development. Microsoft put a completely unjustifiable amount of effort (IMO) into making sure RT 8.1 sucks even more than RT 8.0, but nothing that complex is perfect. If you have a gen1 RT device (anything except a Surface 2 or Lumia 2520) you can downgrade to 8.0 or even dual-boot. Or you can just be patient; the 8.1 jailbreak will be out as soon as it can be made stable.

      --
      There's no place I could be, since I've found Serenity...
    2. Re:Awesome? RT? by ChunderDownunder · · Score: 1

      It'd be nice if MS would officially support loading standard win32 applications, compiled for ARM, without jailbreaking though.

      Now obviously they want to avoid a situation where a consumer tries to install a shrink-wrapped x86 program that won't run on a different architecture - but there are other means. e.g. distributing platform specific binaries through the Windows store.

  50. 10 LET M$ = "Microsoft" by tepples · · Score: 1

    I'm not going back to GW-BASIC, thanks,

    But at least we know where M$ started out.

  51. Background assembly cache updates by tepples · · Score: 1

    Would you rather they didn't update the assembly cache when they install an update? So your applications have to wait for their dependencies to be updated while they start?

    I'd rather have it update the assembly cache in the background after the interruption of a reboot. This way I can run non-.NET applications on one core while the assembly cache updates on another.

    1. Re:Background assembly cache updates by Cenan · · Score: 1

      Sounds like a great user experience right there. Hmm, I just updated, maybe this app will work, maybe it won't?

      --
      ... whatever ...
    2. Re:Background assembly cache updates by tepples · · Score: 1

      Hmm, I just updated, maybe this app will work, maybe it won't?

      That's easy: if the app is .NET it won't work; if it's not .NET it will. If the user can get useful work done without .NET apps, the user can just choose to avoid the programs whose icons the operating system has marked with an hourglass.

    3. Re:Background assembly cache updates by viperidaenz · · Score: 1

      What if there are native applications that have .net dependencies?

    4. Re:Background assembly cache updates by tepples · · Score: 1

      What if there are native applications that have .net dependencies?

      They'd get the hourglass too until the assembly cache catches up. But the user should still be able to use non-.NET applications, such as the web browser and a basic text editor, during that time.

    5. Re:Background assembly cache updates by viperidaenz · · Score: 1

      How does the OS know the application ends up depending on .net code if executable is native code?

  52. Battery life by tepples · · Score: 1

    Memory and CPU power are there to be used so why not take advantage of it.

    Battery life, for one. The less time a task takes, the less energy your application draws from the battery over the course of its running, and the less energy the screen draws from the battery while the user waits for it to finish.

  53. When it's 30 fps vs. 60 fps by tepples · · Score: 1

    the fact is that in the vast majority of cases saving 5ms while expending 5 times the development effort

    For something that takes 20 ms to execute, making it take only 15 ms will help your application update its view every vertical blank instead of every two vertical blanks.

    due to NIH syndrome

    One cause of NIH syndrome is disagreement with the licensing terms of the pre-existing libraries. Another is that the pre-existing libraries happen not to be ported to a platform that you plan to support.

  54. If you're coding for a 6502 by tepples · · Score: 1

    If you're trying to write something for an 8-bit microcontroller or a retro video game console, a lot of C compilers aren't necessarily competitive with hand-tuned assembly in terms of size or speed of the object code. Or what optimizing compiler targeting the 6502 do you recommend?

    1. Re:If you're coding for a 6502 by serviscope_minor · · Score: 1

      Or what optimizing compiler targeting the 6502 do you recommend?

      Not sure about the 6502, but for the Atmel series of 8 bit micros, I reccomend GCC, same as always.

      --
      SJW n. One who posts facts.
  55. .NET CF can't run IronPython by tepples · · Score: 1

    No need to use Mono for ARM. .NET has been supported on numerous architectures, including ARM, as part of Windows CE for years. Sure, it was only a subset of the full framework

    The .NET Compact Framework can't even run IronPython or any other DLR language because it lacks Emit.

  56. Portability of C# by tepples · · Score: 1

    why not do it in C# if it runs fast enough?

    Because too many people who code in C# tend to get lazy and not test in Mono.

    1. Re:Portability of C# by Anonymous Coward · · Score: 0

      Because too many people who code in C# tend to not know about or care about Mono.

      FTFY

  57. Re:Thanks, but.... by Cenan · · Score: 1

    This is actually fucking awesome. They've got native compilation of Win32/64 desktop and server apps on the road-map. You're right, nobody cares about the Windows Store, which is why they targeted those apps first (you know, developers, developers, developers and all that shit).

    The FAQ clearly states that they're planning to propagate this feature to all .Net apps.

    Desktop apps are a very important part of our strategy. Initially, we are focusing on Windows Store apps with .NET Native. In the longer term we will continue to improve native compilation for all .NET applications.

    I'm guessing that means .Net 4.5+ apps, which in turn means Windows 8+. So here's for hoping that Windows 9 is not gonna suck so much donkey ball, that we can actually expect to be able to upgrade 7 -> 9 without relinquishing part of our soul to the UX demon-child they hired to "improve the user experience".

    --
    ... whatever ...
  58. Re:Thanks, but.... by Cenan · · Score: 1

    Desktop apps are a very important part of our strategy. Initially, we are focusing on Windows Store apps with .NET Native. In the longer term we will continue to improve native compilation for all .NET applications.

    I'm not your Google bitch, so you can figure out where that quote came from on your own yeah?

    --
    ... whatever ...
  59. Re:Ah... by Cenan · · Score: 1

    Some of us are capable of writing anything we need, we just have better things to do than re-invent wheels all the time. Grow up.

    --
    ... whatever ...
  60. gawicks by Anonymous Coward · · Score: 0

    It won't be. Only the code that'll be required will be included ,others will be shaken out.

  61. Re:Ah... by fnj · · Score: 1

    OK. Your time costs more than 10 MB of RAM. But does it cost more than 10 MB of RAM times 100 apps times one million users? In the latter case, the guys who collectively write the 100 apps are costing the users collectively an extremely large amount of resources (think money).

    It depends on how the app is going to be used. I program with C, C++, and Python, as appropriate.

  62. Re:Ah... by maevius · · Score: 1

    I program on niche embedded devices which have 16mb of ram and still cost a lot of money for what they are. C is the only way there. However through the development circle we have a lot of bugs which get attributed to improper memory management - null dereferencing, memory leaks and the like. This makes the development circle longer, which is acceptable.

    Now on the mobile market, it is an implied that the consumer prefers a lot of relatively stable applications in a short period of time. The tradeoff for this is to pay $20 more (probably much less) for the cost of doubling the RAM.

    I think in the end, the problem is talent. Talent is scarce. It needs talent to program in C and it needs talent to design RAM modules. However RAM modules are designed once and then produced in an ultra massive scale. On the other side, every little bit of code needs a developer to work on it. And I know from experience that there isn't enough talent in C to produce the loads and loads of software that is currently produced - and even if there was, it would cost. So in the end I think the way it is, is the only way.

  63. Re:Ah... by jma05 · · Score: 1

    > You should pretend your work will be so popular if you want it to be so popular.

    No you should not. This is amateur/hobbyist talk. When you have a billion customers, you will have plenty of money to optimize... or by then, you will be able to afford to keep plenty of "terabytes" online. Writing apps for billions of users when all you are likely to have is a few hundred/thousand users... is plain delusional and is inviting trouble.

    Highly optimized, hyper-scalable code does not come for free. You will simply go bankrupt before you even get the users to stress your app, if you keep wasting your limited resources (and they are always limited) on imaginary requirements. Keep the architecture clean and follow the wisdom of established design principles. Later optimization will be relatively easy, *if* that need ever arises.

    "Premature optimization is the root of all evil" - Donald Knuth.

  64. or just use c++ in the first place by BestNicksRTaken · · Score: 2

    never seen the point of c#

    --
    #include <sig.h>
    1. Re:or just use c++ in the first place by gewalker · · Score: 1

      Used to do a lot of C++ coding, one man and teams. When doing C++, would have problem apps that the c++ expert (often me) had to debug because of crashes, memory leaks, etc. When doing similar things in c#, these problems largely go away. C# is hardly unique in this aspect (Java, etc.)

      Though I love me some c/c++, I also know that most programmers will find C# and other higher languages less troublesome in the real world. Deny it if you want, but it my experience there is no contest.

      IMO C# is really of nice language, too bad it is effectively MS only -- Mono is not really mainstream, and appears unlikely to ever get this unless a miracle occurs.

    2. Re:or just use c++ in the first place by Anonymous Coward · · Score: 0

      The Unity 3D engine, which has become the most used engine on mobile devices, uses Mono to allow development in C#. I would say that is mainstream.

  65. Re:Ah... by serviscope_minor · · Score: 2

    The best tool -- to date -- for anything serious aimed at a major OS is c. By far. Not C++

    Not only that, but it must only be written by a true Scotsman as well.

    There are many major, serious, projects written in C++.

    GCC, LLVM, Firefox, QT, Webkit, the JVM, libre/open office.

    In fact GCC recently switched from C to C++. Basically, C++ provides exactly the same machine model as C, except that it gives you a more programmable compiler and richer abstractions. There are very, very few places that it's worth using C over C++, unless you have a thing for writing yet another resizable array implementasegmentation fault (core dumped).

    --
    SJW n. One who posts facts.
  66. Extend to logical conclusion by TangoMargarine · · Score: 1

    And if we coded it all in assembly, it would be even better!

    Or how about choosing between a free $10 or receiving $100 for being kicked in the balls. You'd take the $100 ballkick, right?

    --
    Unity? Screw that: XFCE. Slashdot Beta? Screw that: SoylentNews. Australis? Screw that: Pale Moon. UX developers DIAF
  67. gawicks by Anonymous Coward · · Score: 0

    The assembly will be tree shaken, so no there won't be half gigabyte executables.

  68. It works better than you think by Anonymous Coward · · Score: 0

    Actually, generic virtual methods do work in .NET Native.

    1. Re:It works better than you think by shutdown+-p+now · · Score: 1

      This can only work with precompilation if dynamic assembly loading is disabled (so that the complete set of instantiations is known in advance). This may be feasible for Store apps, but many desktop apps need extensibility.

  69. This reminds me of VB 5.0 by Anonymous Coward · · Score: 0

    When MS did the EXACT SAME THING (using a less optimization capable C++ motor behind the executable (less interpreted, & iirc, ONLY forms were interpreted - the compiler didn't do things as well as MSVC++, for instance, in doing loop unrolling))...

    Did it work out? Yes, in MOST cases!

    I.E. - they did achieve faster running executables (but more memory space consumed initially etc.)

    APK

    P.S.=> "The more things change, the more they stay the same"... apk

  70. that would speed up semi-heavy computation by kbigdelysh · · Score: 1

    Wow! 60% increase! That's awesome and promising. I hope it also benefits applications which are doing heavy computations (although most of these apps offload their computation to a server).

  71. Re:Ah... by gonnagetya · · Score: 1

    Put it another way - I'd prefer it if Windows Updates were perhaps more verbose, so I'd know what they're actually doing that's taking so long. For all I know an update is taking too long because it's timed out and failed (which has occasionally happened). At least with Linux the longer updates print a fair amount of messages explaining if they're updating a cache or something.

  72. Re:Ah... by Billly+Gates · · Score: 1

    You can stop pretending that our multicore processors with 64 gigs of ram can't handle them.

    ...and perhaps you can stop pretending that HLL bloatware has anywhere near the performance of hand coded apps *on the same CPU*. It has nothing to do with GUI's per se, either. It's about frameworks with years and years of bloat, slow code in black boxes that can't be sped up (or often even bugfixed, as we have sadly come to learn), about ridiculous amounts of memory getting chewed up by library after library, about swapping instead of careful memory use... please don't pretend that faster CPUs have addressed the performance issues of higher (and higher) level approaches. The bottom line is still that well crafted apps that eschew OO approaches will almost always outperform for both memory use and speed, given the same environment to run in.

    Wow straight out of 1989.

    Modern compilers can probably generate code as fast as you can assemble it. Things have changed a lot in the last 20 years. FYI modern cpus just convert x86 assembly to risc internally. You do not touch the hardware anymore even if you think you do so you loose that efficiency you think you gain.

    Let's talk about bloat? How about the bloat of paying you to write code to do something someone can do in half the time with half the experience? That is a bloated pocketbook of lost cash. Sure you can name some custom things which require it but at the end of the day deadlines for that complex business web app need to be finished or people lose their jobs. Java can do this fine with its rich frameworks just as an example.

  73. Native apps list the DLLs that they import by tepples · · Score: 1

    If any DLL listed in an application's imports section has an hourglass, the app has an hourglass. While an assembly cache rebuild is in progress, the OS can traverse this graph of imports to see what apps need the hourglass.

    1. Re:Native apps list the DLLs that they import by viperidaenz · · Score: 1

      That's not where a .net assembly would be referenced.
      An application model where one process manages a handful of other ones, like the browser I'm typing this in, there is no way for an OS to know that the process the user starts executes another one. It's stored in the exe as a string.

  74. Native app starting CIL app: outlier? by tepples · · Score: 1

    First let me restate your scenario as I understand it, so that I can be sure we aren't talking about different things. You posit an unmanaged executable starting a child process that is a CIL executable, before the CLR implementation has had a chance to rebuild the assembly cache, without any intervening user interaction (such as choosing an application to run) that gives the operating system a chance to present the CIL executable as temporarily unavailable. And you want the operating system to block the user from starting any executable for tens of minutes at a time just in case it happens to be an unmanaged executable that automatically starts a CIL executable.

    If so, I'm interested in your argument as to how this scenario isn't an outlier. What commonly used process would this break?

  75. Re:Ah... by terjeber · · Score: 1

    Didn't your mother tell you that you should not switch off the computer while it was updating? It's not the fault of Microsoft that you turned off your computer, returned 42 minutes later and expected it to be upgraded.