Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

There is so much information available for Java--the internal details of (for example) the JVM memory manager are well-documented, and the performance considerations arising from its interaction with user code have been publicly discussed. I am interested to know if there is any comparable documentation for the Mathematica kernel. Specifically:

  • What are the major steps involved in evaluation?
  • Which of these are the most important from a performance standpoint?

Is there any public documentation available about how all of this is implemented? If there is, I wasn't able to find it after searching the Internet: neither the mechanics of the evaluation process, nor the internal workings of particular functions, seem to be known outside of WRI.

share|improve this question
Have a look here. – Daniel Lichtblau Mar 4 '13 at 19:06
@Oleksandr R. quite the edit! – Yves Klett Mar 4 '13 at 19:35
This question may be a duplicate of this one. – m_goldberg Mar 4 '13 at 19:36
See if you can find a copy of book Power Programming With Mathematica: The Kernel by David B. Wagner, McGraw-Hill, 1996, in a library. It's out-of-print and hard to find, unfortunately, but it contains the best description I know of on how the kernel works. – m_goldberg Mar 4 '13 at 19:40
@OleksandrR. Seeing your work I feel it should be possible to upvote edits. – Sjoerd C. de Vries Mar 4 '13 at 20:16

To give references to the first part of your question:

The best description about the main evaluation loop I have ever read can be found in (as already stated in the comments) Power Programming with Mathematica: The Kernel by David Wagner. A free pdf version of this book can be downloaded here. Therein, he refers to the tutorial Mathematica Internals: A Tutorial by David Withoff.

Although, these documents are rather old, I'm pretty sure they are still correct since this topic covers the core evaluation process which hasn't changed.

share|improve this answer
Is there an alternative version of Withoff's article? I cannot open the postscript in the provided link, (I tried with many linux programs). – alfC Oct 27 '14 at 7:19
Also a fresh link for the book… (it is supposedly public domain now) – alfC Oct 27 '14 at 7:26

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.