-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't working or doesn't seems to work rightSomething isn't working or doesn't seems to work rightdiscussionQuestions about implementation details, help or supportQuestions about implementation details, help or supportgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Sqllex v0.1.10.3b
Converting (tuples)
to [lists]
costs for select-like methods 55.8% of all time.
This is an results for:
def select_where_1(db: SQLite3x):
db.select(
'main', 'id',
WHERE={
'name': 'Alex'
},
LIMIT=1000
)
In my opinion it's too much time for such feature. Maybe we should use numpy.arrays
inside sqllex's processing (instead of lists).
Found this example and i think it might be the decision.
https://stackoverflow.com/questions/63409324/why-numpy-array-is-faster-than-list-in-python
P.S.:
<built-in method builtins.isinstance> takes 1/10 of all time
P.P.S:
sqllex v0.1.10.3a
crete_table(db) # 0.003847
insert_fats(db) # 0.06685 sec (1000 rec)
insert_slow(db) # 0.2699 sec (1000 rec)
insert_many_fast(db) # 0.005199 (1000 rec)
insert_many_slow(db) # 0.005518 (1000 rec)
select_all(db) # 0.005709 (1000 rec)
select_where_1(db) # 0.002922 (1000 rec)
select_where_2(db) # 0.003836 (1000 rec) << why?
Metadata
Metadata
Assignees
Labels
bugSomething isn't working or doesn't seems to work rightSomething isn't working or doesn't seems to work rightdiscussionQuestions about implementation details, help or supportQuestions about implementation details, help or supportgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed