pip3 install sortedcontainers
from sortedcontainers import SortedSet, SortedList
from bisect import bisect
sl = SortedList(i * 10 for i in range(1000000))
ss = SortedSet(i * 10 for i in range(1000000))
s = set(i * 10 for i in range(1000000))
list(ss.irange(123, 456))
[130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450]
def isin():
n = 0
for i in range(100000):
if i * 2 in s:
n += 1
return n
isin()
20000
def issin():
cnts = ss.__contains__
n = 0
for i in range(100000):
if cnts(i * 2):
n += 1
return n
issin()
20000
def issin2():
s = ss._set
n = 0
for i in range(100000):
if i * 2 in s:
n += 1
return n
issin2()
20000
def issiin():
cnts = ss.__contains__
return sum(1 for i in range(100000) if cnts(i * 2))
issiin()
20000
def islin():
n = 0
for i in range(100000):
if i * 2 in sl:
n += 1
return n
islin()
20000
from utils import prof
def perf(func, *args, **kwargs):
return prof(func, locals(), globals(), *args, **kwargs)
result = perf(isin)
2 function calls in 0.011 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.011 0.011 0.011 0.011 <ipython-input-6-8e16a711c68a>:1(isin) 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
result = perf(issin)
100002 function calls in 0.038 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.024 0.024 0.038 0.038 <ipython-input-41-f46da62b1c24>:1(issin) 100000 0.013 0.000 0.013 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedset.py:194(__contains__) 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
result = perf(issin2)
2 function calls in 0.010 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.010 0.010 0.010 0.010 <ipython-input-58-1b12ec682e8a>:1(issin2) 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
result = perf(issiin)
120004 function calls in 0.043 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 0.043 0.043 <ipython-input-47-ee4073e66e27>:1(issiin) 1 0.002 0.002 0.043 0.043 {built-in method builtins.sum} 20001 0.027 0.000 0.041 0.000 <ipython-input-47-ee4073e66e27>:3(<genexpr>) 100000 0.013 0.000 0.013 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedset.py:194(__contains__) 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
result = perf(islin)
400002 function calls in 0.159 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.024 0.024 0.159 0.159 <ipython-input-21-a6963ac7fe75>:1(islin) 100000 0.057 0.000 0.135 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:358(__contains__) 200000 0.070 0.000 0.070 0.000 {built-in method _bisect.bisect_left} 100000 0.009 0.000 0.009 0.000 {built-in method builtins.len} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
import pickle
import gzip
GZIP_LEVEL = 2
PICKLE_PROTOCOL = 4
def save(data, fileName):
with gzip.open(fileName, "wb", compresslevel=GZIP_LEVEL) as f:
pickle.dump(data, f, protocol=PICKLE_PROTOCOL)
def load(fileName):
with gzip.open(fileName, "rb") as f:
return pickle.load(f)
fileName = '_temp/ss.tfx'
perf(save, ss, '_temp/ss.tfx')
664 function calls in 0.110 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 0.110 0.110 <ipython-input-73-6dc37591d02d>:1(save) 1 0.028 0.028 0.106 0.106 {built-in method _pickle.dump} 77 0.000 0.000 0.077 0.001 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:247(write) 77 0.075 0.001 0.075 0.001 {method 'compress' of 'zlib.Compress' objects} 1 0.000 0.000 0.004 0.004 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:20(open) 1 0.000 0.000 0.004 0.004 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:123(__init__) 1 0.004 0.004 0.004 0.004 {built-in method io.open} 87 0.002 0.000 0.002 0.000 {method 'write' of '_io.BufferedWriter' objects} 78 0.000 0.000 0.000 0.000 {built-in method zlib.crc32} 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:302(close) 1 0.000 0.000 0.000 0.000 {method 'close' of '_io.BufferedWriter' objects} 1 0.000 0.000 0.000 0.000 {built-in method zlib.compressobj} 77 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/_compression.py:12(_check_not_closed) 1 0.000 0.000 0.000 0.000 {method 'flush' of 'zlib.Compress' objects} 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:221(_write_gzip_header) 79 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:298(closed) 80 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} 77 0.000 0.000 0.000 0.000 {built-in method builtins.len} 3 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:64(write32u) 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/posixpath.py:144(basename) 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:213(_init_write) 3 0.000 0.000 0.000 0.000 {built-in method _struct.pack} 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/posixpath.py:41(_get_sep) 2 0.000 0.000 0.000 0.000 {method 'encode' of 'str' objects} 1 0.000 0.000 0.000 0.000 {method 'rfind' of 'str' objects} 2 0.000 0.000 0.000 0.000 {method 'startswith' of 'str' objects} 2 0.000 0.000 0.000 0.000 {built-in method posix.fspath} 1 0.000 0.000 0.000 0.000 {built-in method time.time} 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedset.py:698(__reduce__) 1 0.000 0.000 0.000 0.000 {method 'endswith' of 'bytes' objects} 1 0.000 0.000 0.000 0.000 {method 'replace' of 'str' objects} 1 0.000 0.000 0.000 0.000 {built-in method builtins.chr} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
ss2 = perf(load, fileName)
7592 function calls (7287 primitive calls) in 0.279 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 0.279 0.279 <ipython-input-73-6dc37591d02d>:5(load) 1 0.063 0.063 0.275 0.275 {built-in method _pickle.load} 1 0.007 0.007 0.189 0.189 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedset.py:108(__init__) 1 0.050 0.050 0.183 0.183 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedset.py:664(update) 2 0.000 0.000 0.112 0.056 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:320(update) 4 0.000 0.000 0.068 0.017 {method 'extend' of 'list' objects} 1002 0.067 0.000 0.067 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:349(<genexpr>) 2 0.044 0.022 0.044 0.022 {built-in method builtins.sorted} 154 0.000 0.000 0.021 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:271(read) 469/164 0.002 0.000 0.021 0.000 {method 'read' of '_io.BufferedReader' objects} 306 0.001 0.000 0.021 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/_compression.py:66(readinto) 1 0.020 0.020 0.020 0.020 {method 'update' of 'set' objects} 306 0.001 0.000 0.019 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:438(read) 306 0.015 0.000 0.015 0.000 {method 'decompress' of 'zlib.Decompress' objects} 1 0.000 0.000 0.004 0.004 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:20(open) 1 0.000 0.000 0.004 0.004 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:123(__init__) 1 0.004 0.004 0.004 0.004 {built-in method io.open} 315 0.000 0.000 0.002 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:80(read) 306 0.000 0.000 0.001 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:489(_add_read_data) 154 0.000 0.000 0.001 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:291(peek) 307 0.000 0.000 0.000 0.000 {built-in method zlib.crc32} 154 0.000 0.000 0.000 0.000 {method 'peek' of '_io.BufferedReader' objects} 1002 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:351(<genexpr>) 308 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/_compression.py:12(_check_not_closed) 1692 0.000 0.000 0.000 0.000 {built-in method builtins.len} 154 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:93(prepend) 306 0.000 0.000 0.000 0.000 {method 'cast' of 'memoryview' objects} 310 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:298(closed) 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:302(close) 2 0.000 0.000 0.000 0.000 {method 'close' of '_io.BufferedReader' objects} 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:405(_read_gzip_header) 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:378(__init__) 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:141(__init__) 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/_compression.py:59(close) 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/_compression.py:39(__init__) 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:171(__new__) 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:235(clear) 1 0.000 0.000 0.000 0.000 {built-in method zlib.decompressobj} 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:74(__init__) 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:385(_init_read) 1 0.000 0.000 0.000 0.000 {built-in method _struct.unpack} 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/gzip.py:389(_read_exact) 1 0.000 0.000 0.000 0.000 {built-in method __new__ of type object at 0x10fcdff70} 1 0.000 0.000 0.000 0.000 {method 'replace' of 'str' objects} 1 0.000 0.000 0.000 0.000 {method 'startswith' of 'str' objects} 1 0.000 0.000 0.000 0.000 {built-in method builtins.hasattr} 1 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} 1 0.000 0.000 0.000 0.000 {built-in method posix.fspath} 1 0.000 0.000 0.000 0.000 {function DecompressReader.close at 0x7f9e7009a9d8} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/_compression.py:36(readable) 1 0.000 0.000 0.000 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/_compression.py:150(tell)
import collections
data = {i * 3: i * 10 for i in range(1_000_000)}
def none():
return None
data2 = collections.defaultdict(none, data)
fileName = '_temp/defaultdict.tfx'
save(data2, fileName)
data3 = load(fileName)
data3 == data2
True
def v(data, n):
if n in data:
return data[n]
return None
def v2(data, n):
return data[n]
def getVal():
myData = data
n = 0
for i in range(100_000):
if v(data, i) is None:
n += 1
return n
getVal()
66666
def getVal2():
myData = data2
n = 0
for i in range(100_000):
if v2(data2, i) is None:
n += 1
return n
getVal2()
66666
def getVal3():
myData = data2
n = 0
for i in range(100_000):
if data2[i] is None:
n += 1
return n
getVal3()
66666
perf(getVal)
100002 function calls in 0.040 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.024 0.024 0.040 0.040 <ipython-input-117-ccdfc393b640>:1(getVal) 100000 0.017 0.000 0.017 0.000 <ipython-input-115-9c9be12ac0e9>:1(v) 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
66666
perf(getVal2)
100002 function calls in 0.041 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.024 0.024 0.041 0.041 <ipython-input-119-a24629a4e9bc>:1(getVal2) 100000 0.018 0.000 0.018 0.000 <ipython-input-116-012351b3d7ee>:1(v2) 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
66666
perf(getVal333)
2 function calls in 0.018 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.018 0.018 0.018 0.018 <ipython-input-123-92cbdd8a5b3f>:1(getVal3) 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
66666
from tf.app import use
A = use('bhsa:clone', checkout='clone', hoist=globals())
Using TF-app in /Users/dirk/github/annotation/app-bhsa/code: repo clone offline under ~/github (local github) Using data in /Users/dirk/github/etcbc/bhsa/tf/c: repo clone offline under ~/github (local github) Using data in /Users/dirk/github/etcbc/phono/tf/c: repo clone offline under ~/github (local github) Using data in /Users/dirk/github/etcbc/parallels/tf/c: repo clone offline under ~/github (local github) | 0.00s No structure info in otext, the structure part of the T-API cannot be used
BHSA = Biblia Hebraica Stuttgartensia Amstelodamensis: book book@ll chapter code det freq_lex function g_cons g_cons_utf8 g_lex g_lex_utf8 g_word g_word_utf8 gloss gn label language lex lex_utf8 ls nametype nme nu number otype pdp pfm prs prs_gn prs_nu prs_ps ps qere qere_trailer qere_trailer_utf8 qere_utf8 rank_lex rela sp st tab trailer trailer_utf8 txt typ uvf vbe vbs verse voc_lex voc_lex_utf8 vs vt mother oslots
Parallel Passages: crossref
Phonetic Transcriptions: phono phono_trailer
otypeLines = '''
1-426584 word
426585-426623 book
426624-427552 chapter
427553-515673 clause
515674-606361 clause_atom
606362-651541 half_verse
651542-904748 phrase
904749-1172289 phrase_atom
1172290-1236016 sentence
1236017-1300541 sentence_atom
1300542-1414353 subphrase
1414354-1437566 verse
1437567-1446799 lex
'''.strip().split('\n')
otypeItems = [x.split('\t') for x in otypeLines]
otypeData = [tuple(int(y) for y in x[0].split('-')) + (x[1],) for x in otypeItems]
otypeData
[(1, 426584, 'word'), (426585, 426623, 'book'), (426624, 427552, 'chapter'), (427553, 515673, 'clause'), (515674, 606361, 'clause_atom'), (606362, 651541, 'half_verse'), (651542, 904748, 'phrase'), (904749, 1172289, 'phrase_atom'), (1172290, 1236016, 'sentence'), (1236017, 1300541, 'sentence_atom'), (1300542, 1414353, 'subphrase'), (1414354, 1437566, 'verse'), (1437567, 1446799, 'lex')]
otypeBounds = tuple(x[1] for x in otypeData)
otypeBoundaries = SortedList(otypeBounds)
otypeBoundaries
SortedList([426584, 426623, 427552, 515673, 606361, 651541, 904748, 1172289, 1236016, 1300541, 1414353, 1437566, 1446799])
otypeTypes = [x[2] for x in otypeData]
otypeTypes
['word', 'book', 'chapter', 'clause', 'clause_atom', 'half_verse', 'phrase', 'phrase_atom', 'sentence', 'sentence_atom', 'subphrase', 'verse', 'lex']
def otype(n):
i = otypeBoundaries.bisect_left(n)
return otypeTypes[i]
otype(1)
'word'
otype(426584)
'word'
otype(426585)
'book'
from random import randrange
from itertools import repeat
maxNode = 1446799
F.otype.maxNode
1446799
testIndices = tuple(randrange(1, maxNode) for _ in repeat(None, 100_000))
testIndices[0:10]
(941571, 1403341, 738684, 1188363, 1090465, 1298727, 351774, 715335, 857806, 188920)
def getOtype():
fOtype = F.otype.v
WORD = 'word'
n = 0
for i in testIndices:
if fOtype(i) == WORD:
n += 1
return n
getOtype()
29372
def getOtype2():
WORD = 'word'
n = 0
for i in testIndices:
j = otypeBoundaries.bisect_left(i)
thisOtype = otypeTypes[j]
if thisOtype == WORD:
n += 1
return n
getOtype2()
29372
def getOtype3():
fOtype = otype
WORD = 'word'
n = 0
for i in testIndices:
if fOtype(i) == WORD:
n += 1
return n
getOtype3()
29372
def getOtype4():
WORD = 'word'
bs = otypeBoundaries.bisect_left
otypes = otypeTypes
n = 0
for i in testIndices:
j = bs(i)
thisOtype = otypes[j]
if thisOtype == WORD:
n += 1
return n
getOtype4()
29372
def getOtype5():
WORD = 'word'
bs = bisect
obounds = otypeBounds
otypes = otypeTypes
n = 0
for i in testIndices:
j = bs(otypeBounds, i)
thisOtype = otypes[j]
if thisOtype == WORD:
n += 1
return n
getOtype5()
29372
perf(getOtype)
170630 function calls in 0.081 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.022 0.022 0.081 0.081 <ipython-input-168-bdc432e5e397>:1(getOtype) 100000 0.053 0.000 0.059 0.000 /Users/dirk/github/annotation/text-fabric/tf/core/api.py:80(v) 70628 0.006 0.000 0.006 0.000 {built-in method builtins.len} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
29372
perf(getOtype5)
100002 function calls in 0.045 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.020 0.020 0.045 0.045 <ipython-input-172-07b0e4b56f55>:1(getOtype5) 100000 0.025 0.000 0.025 0.000 {built-in method _bisect.bisect_right} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
29372
perf(getOtype2)
500002 function calls in 0.160 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.030 0.030 0.160 0.160 <ipython-input-154-f3bcda24181d>:1(getOtype2) 100000 0.072 0.000 0.130 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:1154(bisect_left) 200000 0.040 0.000 0.040 0.000 {built-in method _bisect.bisect_left} 100000 0.010 0.000 0.010 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:516(_loc) 100000 0.008 0.000 0.008 0.000 {built-in method builtins.len} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
29372
perf(getOtype3)
600002 function calls in 0.179 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.017 0.017 0.179 0.179 <ipython-input-158-13efc3c2776b>:1(getOtype3) 100000 0.033 0.000 0.162 0.000 <ipython-input-137-9b663aff1655>:1(otype) 100000 0.072 0.000 0.129 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:1154(bisect_left) 200000 0.040 0.000 0.040 0.000 {built-in method _bisect.bisect_left} 100000 0.009 0.000 0.009 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:516(_loc) 100000 0.008 0.000 0.008 0.000 {built-in method builtins.len} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
29372
perf(getOtype4)
500002 function calls in 0.150 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 1 0.022 0.022 0.150 0.150 <ipython-input-170-5fb2c76bc84a>:1(getOtype4) 100000 0.070 0.000 0.128 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:1154(bisect_left) 200000 0.040 0.000 0.040 0.000 {built-in method _bisect.bisect_left} 100000 0.009 0.000 0.009 0.000 /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/sortedcontainers/sortedlist.py:516(_loc) 100000 0.008 0.000 0.008 0.000 {built-in method builtins.len} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
29372