Tuesday, April 4, 2017

Sample Profiling Code Available

Section 5.14 of CS:APP3e demonstrates how to use the code profiling tool gprof to identify slow portions of a program.  It uses as an example a dictionary program that can compute n-gram statistics about a body of text.  Here's the measurements from profiling the code when computing the bigram statistics of all of Shakespeare's works:



We have made all of the code used in this example available on the CSAPP student website, as part of the Chapter 5 materials.  The code has been tested on multiple Linux systems.  You can see how to code does when running on your machine.

Chinese Version of Third Edition Available

The Chinese version of CS:APP3e was published by China Machine Press in November, 2016.


More information is available at the publisher's website.
The translation was performed by Yili Gong and Lian He of Wuhan University.  We are grateful for the conscientious job Yili has done for all three editions of the book.