Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark requests #112

Open
ImmanuelSamuel opened this issue Mar 30, 2018 · 6 comments
Open

Benchmark requests #112

ImmanuelSamuel opened this issue Mar 30, 2018 · 6 comments

Comments

@ImmanuelSamuel
Copy link

I was pleasantly surprised when I found this repo. However, please provide some benchmarks that can push people like me to start using this. Great work btw!

@ballercat
Copy link
Owner

Thank you for the suggestion.

I would like some benchmarks of course but first I would need some useful JS package which could be converted. It's a bit tough for me to implement due to time constraints. Eventually, this compiler would be self-hosted so there would be a good A/B comparison to be made there, on a large codebase.

There are some toy examples in the walt-explorer GitHub page. Like the naive Fibonacci example it is much faster than a JS equivalent. The JS equivalent might even hang indefinitely.

I'll leave the issue open, maybe someone will come along and implement a few. If you have some ideas of benchmarks you'd like to see that would be helpful.

@maudnals
Copy link

maudnals commented Oct 13, 2018

Hi ballercat,
I'm new to walt but would love to help. My background is mostly frontend JS (and long ago C++ with OpenGL).
Am I getting it right, that the goal of this issue is to provide convincing benchmarks of walt vs JS? Which is basically showcasing wasm's performance kick, with specific walt examples?
If so:
How about benchmarks around applying filters on images, would that make sense?
i.e. implementing https://www.html5rocks.com/en/tutorials/canvas/imagefilters/ in walt, and comparing performance on large images?

@ballercat
Copy link
Owner

Hi!

First of all, thank you for offering to help, the project could use it.

Am I getting it right, that the goal of this issue is to provide convincing benchmarks of walt vs JS? Which is basically showcasing wasm's performance kick, with specific walt examples?

I think that's precisely it. In general, there seems to be a demand for examples of benefits with using wasm over JS for performance critical tasks. Going through the exercise of making these comparisons would be beneficial to the general wasm enthusiast community.

How about benchmarks around applying filters on images, would that make sense?

I think this is a great idea. I would love to see this done, but for a slightly different reason. I'd like to see us build something useful with Walt so that we can identify the pain points and fix/document them. What difficulties would someone new to the project (or wasm) face? That's a much more interesting question IMO. It's difficult for me to answer that question today because I'm so involved in the whole thing and know what to expect already. And if the performance is better compared to JS that's a great bonus.

@maudnals
Copy link

maudnals commented Oct 13, 2018

Hi Ballercat, thank you for your input. Very helpful for me to understand your vision / the bigger picture. Walt crossed my way as I was researching how to get started with wasm, would be interesting to see what wasm "democratization" could look like.

Next steps could be:

  • I go ahead and start something, with the aim of implementing some of these filtering algos with walt + prepare a benchmark [1]
  • In the process, I keep some kind of log of my experience as a first-timer with walt/wasm [2]
  • Once the code + benchmark [1] in a sharable state, I make a PR in an 'examples' folder or the like
  • I share my experience log [2] in this issue Benchmark requests #112 thread for the record, and am then happy to discuss it further in this thread or maybe another.

Let me know if this would work!

@ballercat
Copy link
Owner

Sounds good to me!

@maudnals
Copy link

maudnals commented Mar 11, 2019

Hi @ballercat ,

Here are some note about [2], sorry, time flew :)
Will look into [1] later on.

Here's my experience when getting started with Walt. Context: I know JS. I'm new to Walt, but au fait with Wasm (with Rust).

TL;DR:

  • Onboarding part 1 = get the start project running: fantastic 🔥
  • Onboarding part 2 = actually writing my own Walt code: things get harder.
    => Walt's strength to me is its similarity to JS, so it could be leveraged more!

Detailed version:

Caption: [-] for pain points and [+] for pleasant devX

Onboarding part 1

  • [+] https://github.com/ballercat/walt/wiki/Walt-In-5-Minutes is dead simple, so very nice. And it just works. Low bareer to entry, the start project runs smoothly, and it feels just like a normal frontend project.
  • [-] but: https://github.com/ballercat/walt/wiki/Walt-In-5-Minutes is a hybrid way to get started: there are some manual tasks to perform, but they don't help me understand better how a project is built, since they are common frontend workflow tasks.
    As a Walt newcomer, I'd have preferred:
    • Either a readymade boilerplate that I just need to npm install then run - I can look at the project structure myself afterwards. Not sure whether it's intentional not to have a boilerplate, because Walt is evolving, and maintaining it might be too much of a hassle at this stage?
    • Or a more thorough version of "Walt in 5 minutes" (... a "Walt in 10 minutes" ;) ), that would detail a little further how Walt works / how the .walt file will be run.
    • Or both, offered as separate options.
      As a side note: I can't imagine a specific case for JS newcomers to use Walt, since they might as well use their own toolchains (C++/Rust), but maybe there's one! So: if we think of devs who are new to JS, they might be better off with a boilerplate as well, to first abstract them totally from webpack.

Onboarding part 2

  • [-] No syntax highlighting for .walt in my editor VS Code (also looked the market extensions, no luck): obviously this is just a matter of time, but getting a suggestion there would definitely help!
  • [+] Walt really looks like JS, that's great
  • [-] Because Walt really looks like JS, I'm tempted to write code such as:
const arr: i32[] = [1, 2]; // compiling error

So I head to the Syntax wiki page; it's very detailed, but it's missing more examples.
Suggestion: because the strength of Walt is exactly that it feels like JS, why not have a "snippets" doc where Walt code and its JS equivalent are displayed side-by-side?

  • [-] I'm still not clear about walt-JS interop. Is it also using wasm-bindgen? Maybe this relates to wasm-bindgen #114.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants