Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove uses of strtok() and other global state in svm_load_model(). #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 29, 2015

  1. Remove uses of strtok() and other global state in svm_load_model().

    strtok() (as well as the internal readline() function) used global
    state, and therefore were not thread-safe.  Replace them with reentrant
    equivalents.  Thread-safety of loading was checked with valgrind's
    helgrind and drd tools.
    
    As an added bonus, the new tokenization functions are much faster than
    strtok().  In a benchmark with a large model, overall loading time
    decreased by 45% (1.1s vs 1.9s over 32 trials).
    Tavian Barnes committed Sep 29, 2015
    Configuration menu
    Copy the full SHA
    8f06093 View commit details
    Browse the repository at this point in the history