|
发表于 2022-9-7 13:17
来自手机
|显示全部楼层
此文章由 whoisit 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 whoisit 所有!转贴必须注明作者、出处和本声明,并保持内容完整
本帖最后由 whoisit 于 2022-9-7 12:27 编辑
DDD888 发表于 2022-9-1 13:03
老板雇佣我的时候就是要vb.net windows desktop app convert to asp.net mvc website, 开发进度越快越好 ...
您不要对虚拟机有什么偏见啦,什么慢啦,这个都看优化,坐飞机是快,但考虑到安检,机场地理位置比较偏远各种因素,不能把去机场的时间排除在外,高铁站都是在市区很快就到,安检也快,所以几百公里路程飞机不一定比高铁快,
看看大牛Jeffrey Richter怎么说managed app 可以比unmanaged app更快:
For those developers coming from an unmanaged C or C++ background, you’re probably thinking about the performance ramifications of all this. After all, unmanaged code is compiled for a specific CPU platform, and, when invoked, the code can simply execute. In this managed environment, compiling the code is accomplished in two phases. First, the compiler passes over the source code, doing as much work as possible in producing IL. But to execute the code, the IL itself must be compiled into native CPU instructions at run time, requiring more non-shareable memory to be allocated and requiring additional CPU time to do the work. Believe me, because I approached the CLR from a C/C++ background myself, I was quite skeptical and concerned about this additional overhead. The truth is that this second compilation stage that occurs at run time does hurt performance, and it does allocate dynamic memory. However, Microsoft has done a lot of performance work to keep this additional overhead to a minimum. If you too are skeptical, you should certainly build some applications and test the performance for yourself. In addition, you should run some nontrivial managed applications Microsoft or others have produced, and measure their performance. I think you’ll be surprised at how good the performance actually is. You’ll probably find this hard to believe, but many people (including me) think that managed applications could actually outperform unmanaged applications. There are many reasons to believe this. For example, when the JIT compiler compiles the IL code into native code at run time, the compiler knows more about the execution environment than an unmanaged compiler would know. Here are some ways that managed code can outperform unmanaged code: ■ A JIT compiler can determine if the application is running on an Intel Pentium 4 CPU and produce native code that takes advantage of any special instructions offered by the Pentium 4. Usually, unmanaged applications are compiled for the lowest-common-denominator CPU and avoid using special instructions that would give the application a performance boost
A JIT compiler can determine when a certain test is always false on the machine that it is running on. For example, consider a method that contains the following code. if (numberOfCPUs > 1) { ... } This code could cause the JIT compiler to not generate any CPU instructions if the host machine has only one CPU. In this case, the native code would be fine-tuned for the host machine; the resulting code is smaller and executes faster. ■ The CLR could profile the code’s execution and recompile the IL into native code while the application runs. The recompiled code could be reorganized to reduce incorrect branch predictions depending on the observed execution patterns. Current versions of the CLR do not do this, but future versions might.
|
|