# HG changeset patch # User Henry S. Thompson # Date 1736186360 0 # Node ID 663e55844c1d9be17581e696b02470ae4bed1d1d # Parent bc0bdb649c08625fd188146ae49019dc411f6cbc comparing profiles w and w/o cython diff -r bc0bdb649c08 -r 663e55844c1d lurid3/notes.txt --- a/lurid3/notes.txt Fri Jan 03 13:35:14 2025 +0000 +++ b/lurid3/notes.txt Mon Jan 06 17:59:20 2025 +0000 @@ -1028,6 +1028,97 @@ [0.30250774696469307, 0.303345350548625, 0.3002819549292326, 0.30161340720951557, 0.30262864381074905]) so, forget cdb +Hmm... + >: time cdbtest : cython --embed test_lookup1.py + ...[warnings] + >: python3 -m autotyping --aggressive test_lookup1.py + Calculating full-repo metadata... + ... + - 0 warnings were generated. + >: cc -I /usr/include/python3.11 -L /usr/lib/python3.11/config-3.11-x86_64-linux-gnu/ test_lookup1.c -l python3.11 -o test_lookup1 + + >: time ~/lib/python/cc/lmh/test_lookup1.py + 52369734 + 1076046 entries, 130318 given lastmod + + real 1m45.305s + user 1m34.265s + sys 0m8.988s + sing<4969>: time ~/lib/python/cc/lmh/test_lookup1 + 52369734 + 1076046 entries, 130318 given lastmod + + real 2m5.626s + user 1m54.493s + sys 0m9.169s + +Compiled in profiling + + >: python3 /work/dc007/dc007/hst/lib/python/cc/lmh/test_pl.py + /work/dc007/dc007/hst/lib/python/cc/lmh/test_lookup1.py + 52369734 + 1076046 entries, 130318 given lastmod + Mon Jan 6 13:56:04 2025 Profile.prof + + 152694273 function calls (152694246 primitive calls) in 169.605 seconds + + Ordered by: internal time + + ncalls tottime percall cumtime percall filename:lineno(function) + 1 30.001 30.001 30.001 30.001 {built-in method _pickle.load} + 11195226 29.825 0.000 68.952 0.000 igzip.py:196(write) + 11195226 24.403 0.000 24.403 0.000 {method 'compress' of 'isal_zlib.Compress' objects} + 1 23.919 23.919 167.278 167.278 test_lookup1.py:9(mainp) + 10543636 14.072 0.000 14.072 0.000 {method 'search' of 're.Pattern' objects} + 10543637 11.911 0.000 11.911 0.000 {method 'readline' of '_io.BufferedReader' objects} + 21738863 8.646 0.000 12.583 0.000 _compression.py:12(_check_not_closed) + 10543637 8.431 0.000 26.779 0.000 gzip.py:397(readline) + 21738868 3.937 0.000 3.937 0.000 gzip.py:323(closed) + 10543636 3.524 0.000 3.524 0.000 {method 'split' of 'bytes' objects} + 11195226 2.951 0.000 2.951 0.000 {built-in method isal.isal_zlib.crc32} + 11195236 2.814 0.000 2.814 0.000 {method 'write' of '_io.BufferedWriter' objects} + 1 2.327 2.327 169.605 169.605 :1() + 11195324 1.414 0.000 1.414 0.000 {built-in method builtins.isinstance} + 11064997/11064989 1.399 0.000 1.399 0.000 {built-in method builtins.len} + +>: python3 /work/dc007/dc007/hst/lib/python/cc/lmh/test_pl.py +/work/dc007/dc007/hst/lib/python/cc/lmh/test_lookup1.cpython-311-x86_64-linux-gnu.so +52369734 +1076046 entries, 130318 given lastmod +Mon Jan 6 14:50:59 2025 Profile.prof + + 131606993 function calls (131606966 primitive calls) in 164.213 seconds + + Ordered by: internal time + + ncalls tottime percall cumtime percall filename:lineno(function) + 1 67.658 67.658 164.213 164.213 test_lookup1.py:9(mainp) + 11195226 29.944 0.000 69.788 0.000 igzip.py:196(write) + 11195226 25.274 0.000 25.274 0.000 {method 'compress' of 'isal_zlib.Compress' objects} + 10543637 12.200 0.000 12.200 0.000 {method 'readline' of '_io.BufferedReader' objects} + 21738863 8.530 0.000 12.394 0.000 _compression.py:12(_check_not_closed) + 10543637 8.205 0.000 26.723 0.000 gzip.py:397(readline) + 21738868 3.863 0.000 3.863 0.000 gzip.py:323(closed) + 11195226 3.058 0.000 3.058 0.000 {built-in method isal.isal_zlib.crc32} + 11195236 2.784 0.000 2.784 0.000 {method 'write' of '_io.BufferedWriter' objects} +11064996/11064988 1.343 0.000 1.343 0.000 {built-in method builtins.len} + 11195324 1.309 0.000 1.309 0.000 {built-in method builtins.isinstance} + 2 0.040 0.020 0.040 0.020 {built-in method io.open} ================