Commit 49262bda authored by Benjamin Schubert's avatar Benjamin Schubert
Browse files

_yaml.pyx: Forbid expected_type=Mapping, and remove isinstance check

Calls to `isinstance` can be particularily costly. Using type() is
much faster. The only known case where the `isinstance` was useful
is for dictionnaries where we would ask for a 'Mapping' instead.

Disallowing 'Mapping' for expected_type considerably speeds up the
calls to this functions.

Also add into NEWS
parent 6b1f0476
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment