Performance comparison of error does people (the number of times the gap between theory and reality)

A simple but mistakenly compare the performance of a deep human issues are as follows: 

 

The group has just appeared in a performance comparison with the reflection Emit of:

 

Testers: for the cycle 20 million times, has finally come to Emit to better performance than reflection conclusion! ! !

 

Conclusions not? Correct! 

 

More common with string and compare stringbuilder also like for 200000000 of cycles, and then come to a good performance of the latter conclusion. 

 

Conclusions not? Correct!

 

Looking at some of the basic performance test a few, like for 100000000 0 back better, will feel the effect more pronounced with the conclusions of some! ! !

 

In fact, the number of errors in this, the gap between theory and reality! ! ! ! !

 

If the number is set for the end of 500 or less, it is clear that the former better performance. 

 

OK, what is reality? The reality is that very few scenes will be used in one operation for more than 1000 times, usually for less than 500 times the majority.

 

So the reality is that :( Web multithreading) complicated by multiple, multiple single cycles!

 

 

Example: You read data 50, and then reflected as an entity, an output! (So ​​much real reality scene !!! read 500 million data output sub-entity there? There are sick!)

OK, then a user to access, you can for 50 times.

So 1,000 people to visit, what is the situation? * 50 for the 1000? ? ? (Own guess)

 

This is the reality: the 1000 and a concurrent 50 50 * 1000 people cycle performance difference. 


This article aims to tell everyone:

 

If you have not read them, all right, there is a transition, IT field of wrong than not to learn, is misleading is a good thing, to learn, wrong does not matter! 

If you're looking to understand, there have been misleading circumstances, if you seek performance, theory owned by theory, the reality owned by reality, is the last word combination! 

 

Reproduced in: https: //my.oschina.net/secyaher/blog/274148

Guess you like

Origin blog.csdn.net/weixin_34368949/article/details/91966817