Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am building a system and I have a couple of architectures in mind. I want to have an idea of which architecture is likely to be most performant (quickest).

I can make different decisions like 1) Do everything in one thread 2) Separate this part into one thread, that part into another thread since it can run in parallel and so on

Instead of actually building the system in two different ways and seeing how it performs, is there a way to quickly model/prototype the system where I can express the above concepts and the times it takes for inter thread I/O etc (of which I have a very good estimate) and use the model/prototype to estimate which architecture is better?

share|cite|improve this question
Maybe you need a process calculus focused on timing? I cannot help further, I don't know about PC, but it could be an interesting trail to follow. – didierc Feb 21 '13 at 21:50
Essentially, what you want to do is called Synthesis (constructing a system from specifications). In discrete time, this problem is $2-EXP$-complete. In continuous time I think it's even harder. Try this(…) for reference. – Shaull Feb 22 '13 at 10:29

The simple answer is to just build the simplest architecture that gives the results you want. You will have lots of problems anyway, making the system more complex than strictly required is just making more work. And a simple architecture is probably more performant than a more complex one, and easier to work with for further analysis.

Once it is running, check if the performance is enough. If it isn't, measure where it doesn't is up to the task (programmers are notoriously unreliable at estimating that, another reason not to "optimize" before seeing results), then go searching for ways of increasing performance. The most gain can be gotten by architecture changes, then selection of algorithms and data structures, and at the very end local changes (but most of those your compiler will make anyway). Independent of the above, a faster machine might be cheaper than the programmer time required to redo the code.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.