Sign in to follow this  
Followers 0
kuramayoko10

Auto-threading Compiler

4 posts in this topic

I know people in this forums like to talk about compilers and paralelism.

In recent news, some folks at Microsoft Research published a [url="http://research.microsoft.com/pubs/170528/msr-tr-2012-79.pdf"]paper[/url] about an auto-threading compiler. Yes, it should be able to analyze a single-threaded code and determine what parts are safe to run in parallel.

Research on this field is happening for some time now, but this is the most recent (promising) news I've seen so far.
0

Share this post


Link to post
Share on other sites
It's interesting but the problem with parallelism is that you have to design the entire program and entire code-base around it.
You can't add it in afterwards and expect it to work well.

So this compiler would make it easier to write new threaded libraries but it won't do much for existing code.
0

Share this post


Link to post
Share on other sites
Interesting paper.

They needed to add a few keywords (readable, writable, immutable, isolated, consume). They have several logistical restrictions that make it impossible to add to C++ as an extension, but keep it possible to add to C#.

I find section 6.6 of the paper the most interesting section. Just like adding const correctness to a program helps you discover various types of bugs, when the researchers started specifying a readable/writable intent they similarly discovered software defects.

It still has the issues that several other keywords (restrict, const, etc) face: It is up to the programmer to add it; the program runs just fine without it; and if they aren't added the compiler will silently be unable to take the optimization.

They've still got some serious bugs to work out, but I can imagine this getting added to C# around 2016 or so.
0

Share this post


Link to post
Share on other sites

It does not appear conceptually different from the stuff functional language guys have been talking about for years.

 

However, if ms throws its weight behind it and actually delivers on these promises, thatd be awesome.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0