Skip to content

ISSUE | SPEED TESTS | Open discussion #37

@v1a0

Description

@v1a0

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
    )

image

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?

tree/dev/tests/time-tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working or doesn't seems to work rightdiscussionQuestions about implementation details, help or supportgood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions