Before you analyze in depth the runtime performance of your code, have the method millisecondsToRun: display how long it takes to run the code. To do this, add millisecondsToRun: to a method shown in a browser and have the system print the elapsed time to the Transcript. The expressions you add to the method are as follows:
1. Add the following to your code: Time millisecondsToRun: <code> ]
3. From the Edit menu, select Display. The number of milliseconds it takes to run the code is displayed.
|