zacky1972
Pelemay (formerly Hastega) - Challenge for GPGPU on Elixir!
Do you want to learn and use machine learning in Elixir / Phoenix / Nerves apps? Of course, you can, but the machine learning is written in Python and invoked from Elixir via ErlPort… Of course, you can implement some machine learning algorithms in Elixir. However, they have no computational power enough to execute real applications. We wish Elixir could have more computational power!
This may change by Hastega! Hastega will make a series of code fragments of pipelined Enum.map to be transformed into optimized native code using GPUs and/or CPUs with SIMD instructions.
I wrote a post of Medium on Hastega:
Original unveiling/discussion can also be found here: LoneStar Elixir 2019 - anyone go? - #2 by gregvaughn
Most Liked
zacky1972
Pelemay 0.0.6 has been released!
A new feature of this release is to support String.replace.
defmodule M do
require Pelemay
import Pelemaydefpelemay do
def string_replace(subject) do
String.replace(&1, “Fizz”, “Buzz”)
enddef enum_map_string_replace(list) do list |> Enum.map(& String.replace(&1, "Fizz", "Buzz")) endend
end
This code is 4x faster than original Elixir code.
StringReplaceBench
benchmark name iterations average time
Pelemay String.replace 1000000 1.20 µs/op
Enum String.replace 500000 3.92 µs/op
Flow String.replace 5000 678.27 µs/op
I wrote an article:
zacky1972
I’ve just published a new Medium on Hastega (will be renamed)
Have a fun!
Popular in Discussions
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









