GithubHelp home page GithubHelp logo

Comments (6)

tych0 avatar tych0 commented on July 22, 2024

Interesting idea, thanks!

from xcffib.

spinus avatar spinus commented on July 22, 2024

For some of my code (4 cores):

$time (for file in `find -iname '*py'`; do autopep8 --in-place --aggressive --aggressive $file& done; wait)
real    0m32.994s
user    1m56.732s
sys 0m3.244s
$ time autopep8 --in-place --aggressive --aggressive `find -iname '*py'`
real    0m55.356s
user    0m55.152s
sys 0m0.176s

from xcffib.

tych0 avatar tych0 commented on July 22, 2024

On Wed, Aug 13, 2014 at 04:04:12PM -0700, Tomasz Czyż wrote:

For some of my code (4 cores):

$time (for file in `find -iname '*py'`; do autopep8 --in-place --aggressive --aggressive $file& done; wait)
real  0m32.994s
user  1m56.732s
sys   0m3.244s
$ time autopep8 --in-place --aggressive --aggressive `find -iname '*py'`
real  0m55.356s
user  0m55.152s
sys   0m0.176s

Wow, that is wild. Thanks for the tip! Any idea why they're different?


Reply to this email directly or view it on GitHub:
#24 (comment)

from xcffib.

spinus avatar spinus commented on July 22, 2024

autopep8 cannot use multiple cores (yet?).
In this example I spawn one autopep8 process (autopep8 ... &) per python file (which in my case is a little crazy, ~240 files, probably some queueing or gnu parallel should be used here). And then wait is waiting for all those forks.

from xcffib.

tych0 avatar tych0 commented on July 22, 2024

On Wed, Aug 13, 2014 at 7:33 PM, Tomasz Czyż [email protected]
wrote:

autopep8 cannot use multiple cores (yet?).
In this example I spawn one autopep8 process (autopep8 ... &) per python
file (which in my case is a little crazy, ~240 files, probably some
queueing or gnu parallel should be used here). And then wait is waiting
for all those forks.

Ah, of course, I totally missed that. In that case, you might be able to
save yourself some more time by not fork bombing the machine:

~/packages/xcffib master 2 time $(find ./xcffib/*.py | parallel -j $(grep
-c processor /proc/cpuinfo) autopep8 --aggressive --aggressive --in-place
'{}')

real 0m10.553s
user 0m24.760s
sys 0m0.968s
~/packages/xcffib master time (for file in find -iname '*py'; do autopep8
--in-place --aggressive --aggressive $file& done; wait)

real 0m12.749s
user 0m32.038s
sys 0m1.480s

Reply to this email directly or view it on GitHub
#24 (comment).

from xcffib.

spinus avatar spinus commented on July 22, 2024

Very nice.

from xcffib.

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.