Skip to content

Instantly share code, notes, and snippets.

@rtlee9
Created October 23, 2022 04:42
Show Gist options
  • Select an option

  • Save rtlee9/bf5cb69494532337f9533598624a7a5d to your computer and use it in GitHub Desktop.

Select an option

Save rtlee9/bf5cb69494532337f9533598624a7a5d to your computer and use it in GitHub Desktop.
In [19]: fast.strip_dirs().sort_stats(SortKey.CUMULATIVE).print_stats('._format_native_types')
Tue Oct 11 21:18:39 2022 profiler_stats_slow
155947 function calls (154847 primitive calls) in 0.175 seconds
Ordered by: cumulative time
List reduced from 459 to 2 due to restriction <'._format_native_types'>
ncalls tottime percall cumtime percall filename:lineno(function)
11 0.000 0.000 0.001 0.000 numeric.py:282(_format_native_types)
11 0.000 0.000 0.001 0.000 base.py:1549(_format_native_types)
Out[19]: <pstats.Stats at 0x10f7cffa0>
In [20]: slow.strip_dirs().sort_stats(SortKey.CUMULATIVE).print_stats('._format_native_types')
Tue Oct 11 21:18:38 2022 profiler_stats_fast
7122434 function calls (7002287 primitive calls) in 2.686 seconds
Ordered by: cumulative time
List reduced from 419 to 2 due to restriction <'._format_native_types'>
ncalls tottime percall cumtime percall filename:lineno(function)
11 0.000 0.000 0.002 0.000 numeric.py:282(_format_native_types)
11 0.000 0.000 0.002 0.000 base.py:1549(_format_native_types)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment