Code Monkey home page Code Monkey logo

Comments (2)

aminnj avatar aminnj commented on May 22, 2024 2

Actually, this is an easy fix.

-Base.getindex(e::Iterators.Enumerate{LazyTree{T}}, row::Int) where T = (row, first(iterate(e.itr, row)))
+Base.getindex(e::Iterators.Enumerate{LazyTree{T}}, row::Int) where T = (row, LazyEvent(innertable(e.itr), row))

and then...

julia> @time @threads for evt in t ; _ = evt.Muon_pt ; end
  0.420194 seconds (24.55 k allocations: 3.460 GiB, 16.40% gc time, 0.00% compilation time)

julia> @time @threads for (i,evt) in enumerate(t) ; _ = evt.Muon_pt ; end
  0.401146 seconds (27.84 k allocations: 3.460 GiB, 16.16% gc time, 4.41% compilation time)

and then we drop polyester.

from unroot.jl.

aminnj avatar aminnj commented on May 22, 2024
julia> @time @batch for evt in t ; _ = evt.Muon_pt; end
  0.501378 seconds (149.80 k allocations: 3.466 GiB, 11.44% gc time, 12.94% compilation time)

julia> @time @threads for evt in t ; _ = evt.Muon_pt; end
  0.413486 seconds (24.45 k allocations: 3.385 GiB, 18.05% gc time, 4.27% compilation time)

julia> @time @batch for (i,evt) in enumerate(t) ; _ = evt.Muon_pt ; end
  2.157369 seconds (61.70 M allocations: 8.052 GiB, 56.97% gc time, 4.21% compilation time)

julia> @time @threads for (i,evt) in enumerate(t) ; _ = evt.Muon_pt ; end
  2.276005 seconds (61.57 M allocations: 7.970 GiB, 60.74% gc time, 1.21% compilation time)

Whether we use @batch (with our customization) or @threads, the parallelized enumerate(t) sucks, so I guess this means we can drop @batch/polyester.jl?

And in the future it would be nice if we could get @threads for (i,evt) in enumerate(t) to have the same performance as @threads for evt in t

from unroot.jl.

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.