Giter Site home page Giter Site logo

Comments (2)

CameronLonsdale avatar CameronLonsdale commented on May 27, 2024
Fri Apr  7 13:59:35 2017    profiling_results

         174396648 function calls (174396336 primitive calls) in 148.498 seconds

   Ordered by: internal time
   List reduced from 300 to 10 due to restriction <10>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
 38520856   52.282    0.000   55.925    0.000 /home/cameron/Documents/cckrypto/venv/lib/python3.5/site-packages/pycipher/base.py:16(a2i)
    90002   38.616    0.000   99.993    0.001 /home/cameron/Documents/cckrypto/venv/lib/python3.5/site-packages/pycipher/simplesubstitution.py:45(decipher)
    90000   30.695    0.000   41.569    0.000 /home/cameron/Documents/cckrypto/cckrypto/score_functions/ngram.py:28(__call__)
 38610000    5.765    0.000    5.765    0.000 /home/cameron/Documents/cckrypto/cckrypto/util.py:8(<genexpr>)
    90379    4.490    0.000   10.256    0.000 {method 'join' of 'str' objects}
 41340283    3.988    0.000    3.988    0.000 {method 'upper' of 'str' objects}
 47521056    3.845    0.000    3.845    0.000 {method 'isalpha' of 'str' objects}
        1    1.339    1.339  147.619  147.619 /home/cameron/Documents/cckrypto/cckrypto/modules/simplesubstitution.py:10(crack)
  2340052    1.051    0.000    1.051    0.000 {method 'index' of 'list' objects}
    90000    0.871    0.000    2.388    0.000 /home/cameron/Documents/cckrypto/venv/lib/python3.5/random.py:280(sample)

Profiling results indicate that the slowest functions are the decryption from pycipher and the ngram analysis. So these are the focus areas

from lantern.

CameronLonsdale avatar CameronLonsdale commented on May 27, 2024

Faster as of 9f98b6f
Bottleneck now is the ngram scoring function, which is already as optimised as possible for python. For faster speeds we might consider writing the ngram scorer in a faster language like D and then use bindings to call it

from lantern.

Related Issues (19)

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.