原创 Simple technique that improves single threaded app performance

2010-5-7 17:42 3461 20 21 分类: 消费电子

Recently, scientists from NCSU have discovered a  technique that improves performance of  applications up to 20% on a multicore system. And the technique does not need any change in existing code.

To understand its significance, we should first answer the question “why it is difficult  to parallelize a desktop application?”.

If we take a word processing application as an example, it will have a  loop waiting for a key to be pressed,  and when it is pressed, it applies the format/styles to the character, displays the character on screen and returns to the wait loop. It is difficult to convert this logic into pieces of code that can execute in parallel, as the whole code is in a sequential flow and each step will wait for the previous step to complete. Such single threaded applications have little scope of parallelization and have not been able to get benefits of multiple cores.

That is why the news from the scientists at the North Carolina State university (NCSU) is exciting. They have found a simple, effective technique that allows existing programs to get benefits of speed improvement on a multicore system, that too without any change in the code.

What is their magic?

Most of the applications need dynamic memory and they  allocate and free chunks of memory as per their needs. Programs don't care for the return value of the memory free()  function. The NCSU scientists simply moved the free()  function to another core from the main core. This allows free() code to run in parallel to main code. Since applications use malloc() and free() extensively in code, just moving free() code to another core gives improvements of  20% in performance!

This “simple drop in replacement” is achieved by linking applications with a new memory management library and it needs no change in the application code. It is a low hanging fruit of performance improvement and it is surprising how it has missed notice so long!

Simple techniques like this will help desktop user to get visible, tangible improvements in performance for their existing applications on multicore systems!

文章评论1条评论)

登录后参与讨论

用户1582657 2013-1-4 14:04

Thanks ~

相关推荐阅读
用户3673633 2013-10-25 12:03
Update your software without disruption, thanks to multicore!
 Most of us have installed third party software like Chrome browser or Adobe PDF reader in our des...
用户3673633 2012-12-30 16:56
Processor affinity
There is a simple way of getting more performance from the multicore processors. It is called Proc...
用户3673633 2011-12-14 13:35
Multicore support in Linux
Before multicore processors became mainstream, there was a popular model called Symmetric Multipro...
用户3673633 2011-04-28 18:00
Multicore and server side computing
We have seen the challenges of multicore programming in mainstream programming in earlier articles. ...
用户3673633 2010-07-03 22:27
Multicore in Networking
Networking gear companies are bullish about the multicore processors and are seeing tangible benefit...
我要评论
1
20
关闭 站长推荐上一条 /2 下一条