Skip to content

Generated table in table_driven() should be memorized  #9

@hugolbz

Description

@hugolbz

I tried to used the table_driven algorithm from python, and quickly realized that the generated table was not memorized. Instead it is generated for each single call to table_driven(), making the computation several order of magnitude slower than bit_by_bit_fast() in my case.

I think the table should be memorized, either at init, or at first call to table_driven, with something like:

if self.tbl is None:
    self.tbl = self.gen_table()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions