diff --git a/jsonschema.go b/jsonschema.go
index <HASH>..<HASH> 100644
--- a/jsonschema.go
+++ b/jsonschema.go
@@ -35,6 +35,7 @@ func (s *Schema) UnmarshalJSON(bts []byte) error {
 	if err := json.Unmarshal(bts, &schemaMap); err != nil {
 		return err
 	}
+	s.vals = make([]Validator, 0, len(schemaMap))
 	for schemaKey, schemaValue := range schemaMap {
 		if typ, ok := validatorMap[schemaKey]; ok {
 			var newValidator = reflect.New(typ).Interface().(Validator)
Optimize schema unmarshaling.

Initialize s.vals with a capacity high enough that no new arrays will
need to be created in the background as its length is increased.