Search code examples
.net.net-4.0task-parallel-libraryaxum-lang

Axum vs TPL, Async


Axum is a language of its own based on subset and superset of C# 3.0 and TPL is extentions added to .Net 4.0. My question is, how does Axum compare to TPL in terms of performance, implementation and architecture.

Same question for the C# 5.0 Async.

I realize Axum is not automatically available such as TPL is, so assume that one has already installed Axum.

To me it seems like Async is trying to band-aid a problem where as Axum is preventing the wound from occuring in the first place.


Solution

  • Axum is dead:

    Those who have followed this blog will have noticed that it’s been a long time since we posted anything new about Axum, and the time has come to state publicly that which may have been clear to some but not others, that we’re not currently pursuing productization.

    That doesn't mean it's not interesting for study of course, but if you're looking for what's going to be useful and released, you should be looking at TPL and async. (Obviously for async you still need to install the CTP as well.)

    In terms of the "prevention vs band-aid" question, I think you're broadly right:

    On the other hand, the concepts around safe parallelism and agent-based programming were seen by many as too far outside the mainstream to be adopted now in languages like C# and VB. The idea of Axum was to not force these concepts on general-purpose languages, so those of us who have work on Axum are not surprised.

    In terms of the speed of async in C# 5 vs TPL - async builds on the TPL, so the performance is broadly comparable. I believe that the Parallel team have been optimizing Task<T> so that it works better with async in terms of avoiding some of the object instantiation which currently occurs to schedule a continuation etc. In other words, any gap in performance between hand-crafting async code using TPL and using C# 5's asynchronous methods is likely to narrow for the final release.

    If you're interested in how async uses TPL behind the scenes, you might want to read my Eduasync blog series.