Skip to content

Performance issues #13

@adonath

Description

@adonath

I have installed the package but I only achieve ~30.000 pps (puns per second). Is it because Python is slow? I would like to maximize the pun rate for maximum entertainment. Is there anything I can do to get a higher pun rate?

Here is the code snipped I used for benchmarking:

import timeit
from functools import partial

from scipyconference import create_puns

n_puns = 10_000

func = partial(create_puns, n_puns)
timer = timeit.Timer(func)
 
puns_per_second = n_puns / timer.timeit(10)
print(f"Puns per second {puns_per_second:.2f}")

Which gives:

Puns per second 31695.19

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions