slow duplication, how to speed up??

Does anyone know how to speed up the following code, i copied and pasted this, i know nothing of code. Blender slows right down when there are too many empties to copy to.


import bpy


context = bpy.context
scene = context.scene


Empty = [o for o in scene.objects if o.type == 'EMPTY']


for l in Empty:
    # add bone
    bpy.ops.object.armature_add(location=l.location)
    bpy.ops.object.posemode_toggle()
    bpy.ops.pose.constraint_add(type='COPY_LOCATION')
    bpy.context.object.pose.bones["Bone"].constraints["Copy Location"].target = l
    bpy.ops.object.posemode_toggle()