def bench_voluptuous():
    """Benchmark for 1000 objects with 2 fields.
    """
    schema = Schema({
        Required('attr_1'): str,
        Required('attr_2'): int})

    return [schema(obj) for obj in object_loader()]
def bench_voluptuous ( ) : schema = Schema ( { Required ( 'attr_1' ) : str , Required ( 'attr_2' ) : int } ) return [ schema ( obj ) for obj in object_loader ( ) ]
Benchmark for 1000 objects with 2 fields.