execution time for a program in python blender
import bpy
from itertools import product

mesh = bpy.data.meshes['Cube']
objects_scene = bpy.context.scene.objects
objects_data  = bpy.data.objects
actions_data  = bpy.data.actions

def create_cube(name, location):
    obj = objects_data.new(name, mesh)
    objects_scene.link(obj)
    obj.location = location
    return obj

def create_animation(obj, time):
    obj.animation_data_create()
    obj.animation_data.action = action = actions_data.new("Action")
    fcurves = [action.fcurves.new(data_path) for data_path in ("hide", "hide_render")]
    for fcu in fcurves:
        fcu.keyframe_points.insert(   0, 1, {'FAST'}).interpolation = "CONSTANT"
        fcu.keyframe_points.insert(time, 0, {'FAST'}).interpolation = "CONSTANT"
        fcu.extrapolation = "CONSTANT"

n = 6
time = 1    
for i in range(n):
    for indices in product(range(-i, i+1), repeat=3):
        if sum(abs(j) for j in indices) == i:
            cube = create_cube("Cube", indices)
            create_animation(cube, time)
            time += 1


The result rendered using the OpenGL Viewport Renderer:




Note

I scaled down the default cube manually and deleted it afterwards before i ran the script.