Giter VIP home page Giter VIP logo

Comments (4)

gagolews avatar gagolews commented on May 23, 2024

Current version of stri_in_fixed (with boost::unordered_map):

Unit: microseconds
                            expr        min          lq      median          uq        max neval
               match(x100, x100)     10.080     14.2310     37.0440     45.2725    121.462   100
             match(x1000, x1000)     67.136     77.4465    106.8275    118.6175    252.076   100
           match(x10000, x10000)    702.594    812.8285    870.2805    905.0895  21793.674   100
         match(x100000, x100000)  13429.503  13881.8395  14623.7190  33414.6765 136544.595   100
       stri_in_fixed(x100, x100)     46.309     76.5255    103.8125    130.0185    194.928   100
     stri_in_fixed(x1000, x1000)    411.812    461.3915    534.5720    610.9745    919.369   100
   stri_in_fixed(x10000, x10000)   4991.309   5301.7590   5434.6940   5600.4165   8130.862   100
 stri_in_fixed(x100000, x100000)  94513.115  96250.2445  97535.2510  99020.6875 119841.516   100

Unsatisfying. DOT.

from stringi.

gagolews avatar gagolews commented on May 23, 2024

R's match() calls do_match5. It uses a R internal string hashtable directly. So I doubt whether we can get any faster that it. Should stri_in_fixed then be implemented as
match(stri_enc_toutf8(x), stri_enc_toutf8(x)) ?

from stringi.

gagolews avatar gagolews commented on May 23, 2024

to be done: stri_is_coll + pmatch + %in%?

from stringi.

gagolews avatar gagolews commented on May 23, 2024

also for sorted haystacks (bin search/...)

from stringi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.