WojciechMula / pyahocorasick

Python module (C extension and plain python) implementing Aho-Corasick algorithm
BSD 3-Clause "New" or "Revised" License
952 stars 125 forks source link

Custom save load #105

Closed WojciechMula closed 5 years ago

WojciechMula commented 5 years ago

Solves #102

WojciechMula commented 5 years ago

Python 3.6.4

+-----------+--------------------+----------+-------------------+
| function  | peak mem usage [B] | time [s] | file size [B]     |
+-----------+--------------------+----------+-------------------+
| pickle    |      1 757 601 792 | 3.78     |                   |
+-----------+--------------------+----------+       486 464 701 |
| unpickle  |      1 757 601 792 | 1.71     |                   |
+-----------+--------------------+----------+-------------------+
| save      |        584 447 264 | 2.12     |                   |
+-----------+--------------------+----------+       584 447 264 |
| load      |        598 052 864 | 5.87     |                   |
+-----------+--------------------+----------+-------------------+

Features: