There are many ways to speed up Drupal on localhost, and here are some suggestions:
Use Memcache
Memcache is a system that works to speed up virtual private servers by caching server information. The program allows you to allocate a specific amount of the server ram toward caching recently queried data for a certain amount of time. Once the data is requested again, memcache speeds up the process of retrieving it by displaying the cached information instead of generating the result from the database.
After installing and configuring Memcache, download and enable Drupal Memcache API module
Use APC
The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.
After installing and configuring APC, download and enable Drupal APC module
Use Varnish cache
Varnish is a web application accelerator. You install it in front of your web application and it will speed it up significantly.
After installing and configuring Varnish, download and enable Drupal Varnish HTTP Accelerator Integration module
Use Drupal Cache Expiration module
This module provides configurable actions upon events that will expire URLs from caches like reverse proxy caches, internal page caches, etc.This module make more sense when Minimum Cache Lifetime setting is set to a value other than none.
Also, I recommend you to use Zend Server CE instead of default Ubuntu PHP stack.