|
04.05.2009, 20:05 | #1 |
Участник
|
SysDictCoder: X++ method call performance
Источник: http://sysdictcoder.com/blog/x-method-call-performance/
============== Microsoft’s recommendations for performance optimizations are interesting: These statements are probably true but as with all good advice it is important to know the context in which it makes sense. How slow is slow and how expensive is expensive? And should you worry about it? Let’s find out. Test cases In X++ there are different kinds of methods and different ways to call them. There are some interesting cases I can think of right away.
Methods calls may be slow, but they’re certainly not slow enough to accurately measure the time of a single call. Repeating the exact same call a large number of times should average out any measurement errors. The timing code is basically this: <div class="wp_syntax"><div class="code"> timer.start(1); for (i=1; i
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
04.05.2009, 22:13 | #2 |
Участник
|
Спорное утверждение. В большинстве случаев выигрыш несуществен, зато читаемость кода ухудшается гарантированно. В пособиях по рефакторингу тоже не рекомендуют злоупотреблять локальными переменными.
|
|
Теги |
x++ |
|
|