GithubHelp home page GithubHelp logo

Comments (6)

grosser avatar grosser commented on July 17, 2024

they don't do anything special ... try doing .each or calling .size on the result to see if it's the process-to-process overhead

from parallel.

grosser avatar grosser commented on July 17, 2024

could try ractors ...

from parallel.

michaeleisel avatar michaeleisel commented on July 17, 2024

With .each, on a subset of those JSON files (16 files) and after running repeatedly to warm the caches, I get 2.8 seconds with normal serial execution and 3.6 seconds with parallel. So, the difference is not as drastic but still there. With ractors, I see similar decreased performance.

from parallel.

grosser avatar grosser commented on July 17, 2024

the only thing I could imagine doing that is disk io ...
maybe read the files into memory first and then start the blocks ?
(also make sure to return nil or the count from the blocks just in case)

from parallel.

reitzig avatar reitzig commented on July 17, 2024

For spinning disks, random access is relatively slower compared to linear scan. You are converting N linear scans into random access patterns across the same data volume by parallelizing.
Not sure if it's the same for SSDs, but any form of caching the hardware or OS do will be similarly affected.

from parallel.

michaeleisel avatar michaeleisel commented on July 17, 2024

I wonder if we could improve this by improving serialization speed when consolidating the objects produced by child processes by .map?

from parallel.

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.