4 ms·
Years ago, I've used procmon.exe and saw VB6 load project files by doing tons of 1 byte reads... I wonder if the behavior in the article also applies to C# com
by Flow 13y ago
Years ago, I've used procmon.exe and saw VB6 load project files by doing tons of 1 byte reads...
I wonder if the behavior in the article also applies to C# compiles?
- josteink 13y agoMSBuild has come a long way since the VB6 days. C# compilation is seriously fast compared to C++ and the likes (due to its proper staticly typed nature) and this allows the compiler to assert certain things quickly and not waste any more time on this. Given how .NET developers loves separating things into tons of DLLs and libraries (and how .NET makes this easy), I would be surprised if this part of the compilation wasn't as optimized as the rest of the process.
- jacobparker 13y ago> due to its proper staticaly typed nature I'm not sure what you mean by this - C++ compilation isn't slow because of a lack of static typing :) Here is some actual info on the subject: http://www.drdobbs.com/cpp/c-compilation-speed/228701711 http://www.drdobbs.com/cpp/c-compilation-speed/228701711
- raverbashing 13y agoCorrect, the speed has nothing to do with static typing or not. Go is fast to compile as well and statically typed See the post on the C++ preprocessor that was on HN some days ago as well
- Danieru 13y agoMy friend who I'd call the closest thing to a template programmer summarized the situation as such: "The core tenant of C++ has been to move work from runtime to to compile time." Both RAII (avoiding use of new & delete) and generics are strengths of C++ but also require heavy compile time work. RAII needs decent analysis and optimization or your program will thrash copying struts by value. Generics and templates force your compiler to run a second compilation in your frontend. This on top of C's copy/paste based include system and macros gives you what should be one of the slowest to compile procedural languages designable.
- 72deluxe 13y agoRAII doesn't necessarily mean avoiding new and delete. It just means cleaning up in destructors when you use new in the constructor or initialiser list or elsewhere. In particular, RAII means grabbing what you need in the constructor rather than haphazardly creating items in member functions. That's what I thought anyway?
- bhouston 13y agoC# compilation is fast in part because of the removal of headers and the replacement of them by well defined assemblies with interfaces. C# compilation is fast for the same reason Java compilation is fast. :) C++ compilation is sort of screwy in that to compile a new C++ file the compiler actually has re-compile all the definitions of the libraries you are using. It is insanely inefficient compared to just using explicitly defined and immutable API interfaces on Assemblies/Modules.
- noblethrasher 13y agoWhat's the advantage of doing it the C++ way?
- diek 13y agoNone really. It just inherited the C model of compilation.
- Locke1689 13y agoC# is fast because 1) we try really hard to make it fast :) and 2) it's not an optimizing compiler.
- Locke1689 13y agoC# doesn't have a static analyzer :) Right now the closest thing is FxCop or a third-party tool.