         AssertEquals(allocator.live_blocks.size(), 0);
     }
 #endif  // CUB_CDP
+
+    // Performance comparison.  Allocate and free a 1MB block 2000 times
+    CpuTimer    timer;
+    float       cuda_malloc_elapsed_millis      = 0.0;
+    float       cuda_free_elapsed_millis        = 0.0;
+    float       cub_calloc_elapsed_millis       = 0.0;
+    float       cub_free_elapsed_millis         = 0.0;
+    char        *d_1024MB                       = NULL;
+
+    for (int i = 0; i < timing_iterations; ++i)
+    {
+        timer.Start();
+        CubDebugExit(cudaMalloc((void **) &d_1024MB, timing_bytes));
+        timer.Stop();
+        cuda_malloc_elapsed_millis += timer.ElapsedMillis();
+
+        timer.Start();
+        CubDebugExit(cudaFree(d_1024MB));
+        timer.Stop();
+        cuda_free_elapsed_millis += timer.ElapsedMillis();
+
+        timer.Start();
+        CubDebugExit(allocator.DeviceAllocate((void **) &d_1024MB, timing_bytes));
+        timer.Stop();
+        cub_calloc_elapsed_millis += timer.ElapsedMillis();
+
+        timer.Start();
+        CubDebugExit(allocator.DeviceFree(d_1024MB));
+        timer.Stop();
+        cub_free_elapsed_millis += timer.ElapsedMillis();
+    }
+
+    printf("Performance (%d timing iterations):\n", timing_iterations);
+    printf("\t CUB CachingDeviceAllocator allocation speedup: %.2f (avg cudaMalloc %.4f ms vs. avg DeviceAllocate %.4f ms)\n",
+        cuda_malloc_elapsed_millis / cub_calloc_elapsed_millis,
+        cuda_malloc_elapsed_millis / timing_iterations,
+        cub_calloc_elapsed_millis / timing_iterations);
+    printf("\t CUB CachingDeviceAllocator free speedup: %.2f (avg cudaFree %.4f ms vs. avg DeviceFree %.4f ms)\n",
+        cub_calloc_elapsed_millis / cub_free_elapsed_millis,
+        cub_calloc_elapsed_millis / timing_iterations,
+        cub_free_elapsed_millis / timing_iterations);
+
+
+
 #endif
 
     printf("Success\n");
+
     return 0;
 }
 

    CubDebugExit(args.DeviceInit());

    // Get number of GPUs and current GPU
    int num_gpus, initial_gpu;
    if (CubDebug(cudaGetDeviceCount(&num_gpus))) exit(1);
    if (CubDebug(cudaGetDevice(&initial_gpu))) exit(1);

    // Create default allocator (caches up to 6MB in device allocations per GPU)
    CachingDeviceAllocator allocator;

    {
        printf("%s "
            "[--device=<device-id>]"
            "[--bytes=<timing bytes>]"
            "[--i=<timing iterations>]"
            "\n", argv[0]);
        exit(0);
    }
