zacky1972
Pelemay Fast Parallel map has just been released!
This is a present of the end of year for Elixir programmers from me: The new package “Pelemay Fast Parallel map” has been released! It drives multi cores and is 3x faster than Enum! Check it out, soon!
Pelemay Fast Parallel map (or pelemay_fp) - Fast parallel map function for Elixir
- pelemay_fp | Hex
- GitHub - zeam-vm/pelemay_fp: Fast parallel map function for Elixir · GitHub
- PelemayFp — PelemayFp v0.1.0
Pelemay Fast Parallel map: provides fast Parallel map function, similar to the Enum module, although computations will be executed in parallel using Process.spawn/4.
Here is a quick example on how to calculate the square of each element with PelemayFp:
list
|> PelemayFp.map(& &1 * &1)
We conducted performance evaluation of PelemayFp, Pelemay, Flow, Enum and Pmap on iMac Pro (2017):
## PelemayFpBench
benchmark name iterations average time
PelemayFp 200 10177.85 µs/op
Pelemay 100 16762.24 µs/op
PelemayFp and Pelemay 100 18532.70 µs/op
Flow (without sorting) 100 18731.43 µs/op
Enum 50 31283.36 µs/op
Flow (with sorting) 10 105091.00 µs/op
Pmap 1 1213749.00 µs/op
Thanks! A happy new year!
Most Liked
zacky1972
PelemayFp that fixed the issue that unreceived messages remained has just been released!
zacky1972
I added benchmark of Stream and Task.async_stream. Thanks
## PelemayFpBench
benchmark name iterations average time
PelemayFp 100 14143.22 µs/op
Pelemay 100 18627.19 µs/op
PelemayFp and Pelemay 100 20414.04 µs/op
Flow (without sorting) 100 20720.33 µs/op
Enum 50 31957.12 µs/op
Stream 50 38792.98 µs/op
Flow (with sorting) 10 116906.90 µs/op
Pmap 2 830539.50 µs/op
Task.async_stream 1 1099493.00 µs/op
al2o3cr
I tried out some changes to increase the per-element workload, because there’s a fair bit of overhead with starting communicating processes. See notes in [WIP] make work adjustable, add extra tests by al2o3cr · Pull Request #1 · zeam-vm/pelemay_fp_benchmark · GitHub
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









