Skip to content

Using code generation for word lookups #1

@h4cc

Description

@h4cc

Just a idea for a possible optimization.

Instead of this map/filter/reduce some code could be generated at compiletime with data from the JSON file to let the BEAM Runtime do that lookup via pattern matching:
https://github.com/dantame/sentient/blob/master/lib/sentient.ex#L14-L16

A simple example from a library i did:
https://github.com/h4cc/slugger/blob/master/lib/slugger.ex#L79-L84

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