taku910 / crfpp

CRF++: Yet Another CRF toolkit
Other
505 stars 192 forks source link

Shrink the size of some FreeLists. #20

Open tavianator opened 8 years ago

tavianator commented 8 years ago

These FreeLists were responsible for 5.4MiB of allocations per query. This is an excessive amount for systems that may have hundreds or thousands of queries in flight at any particular time. They are now shrunk to 82KiB per query.

The sizes were determined by some internal experimentation; they are the smallest sizes that didn't cause reallocations on a typical NER task (for us). YMMV for other tasks.

tavianator commented 8 years ago

In our internal benchmarks, this increased tagging performance between 10-30X, depending on the size of the CRF.

tavianator commented 8 years ago

Furthermore, training time stayed the same, within 0.03%.