close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "darcs": Can't find an appropriate component, maybe the corresponding plugin was not enabled? ). Look in the Trac log for more information.

Changes between Version 13 and Version 14 of WikiStart


Ignore:
Timestamp:
2010-07-20 03:14:51 (14 years ago)
Author:
zooko
Comment:

correct names and also naïve

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v13 v14  
    1818This works fine as long as the total amount of bytes accumulated and the number of separate {{{add_data()}}} events stay small, but it has O(N^2^) behavior and has bad performance if those numbers get large. Here are some benchmarks generated by running {{{python -OOu -c 'from stringchain.bench import bench; bench.quick_bench()'}}} as instructed by [source:README.txt the README.txt file].
    1919
    20 The {{{N:}}} in the left-hand column is how many bytes were in the test dataset. The {{{ave rate:}}} number in the right-hand column is how many bytes per second were processed. "naive" means the string-based idiom sketched above and "strch" means using the !StringChain class.
     20The {{{N:}}} in the left-hand column is how many bytes were in the test dataset. The {{{ave rate:}}} number in the right-hand column is how many bytes per second were processed. "Stringy" means the string-based idiom sketched above and "!StringChain" means using the !StringChain class. "StringIOy" means another implementation using the cStringIO class.
    2121
    2222{{{
     
    9090}}}
    9191
    92 The naive approach is slower than the !StringChain class, and the bigger the dataset the slower it goes. The !StringChain class is fast and also it is scalable (with regard to these benchmarks at least...).
     92The naïve approach is slower than the !StringChain class, and the bigger the dataset the slower it goes. The !StringChain class is fast and also it is scalable (with regard to these benchmarks at least...).
    9393
    9494Okay how do you use it? It is very simple -- see [source:stringchain/stringchain.py] and let me know if that interface doesn't fit your use case.