Skip to content

as-bind Markdown Parser: Quick Benchmark Performance Results #1118

@torch2424

Description

@torch2424

cc @dcodeIO @MaxGraey

Hello! So I chatted with @dcodeIO about this once over DMs. But I figured I'd open an issue, as another thing we can just be aware of:

So for as-bind, I have a markdown parser demo, and one thing I have in the branch: 0.1.3-wasm-benchmark, is a little benchmark for the as-bind Markdown parser in JS and AssemblyScript and pulldown-cmark wasm.

The results from that can be seen in this as-bind issue. But TL;DR this is not a Rust vs. AS benchmark as they have completely different implementations. But, the JS compiled version starts to outperform the AS compiled version as the input size increases. However, the pulldown-cmark rust implementation stays consistently really fast.

And here's a quick screenshot of like the biggest input I could give both AS and JS without crashing (Note this was a pre-published version being used here):

Screenshot from 2019-12-06 19-23-23

Again, just another thing for us to be aware of and track, as I remember it was something @dcodeIO said would be fun to go through and see where the performance stuff happens.

And for anyone who happens to come across this: This is a very quickly hacked together markdown parser, and a hacked together benchmark. if you are looking for a better JS vs. AS / Wasm benchmark, please see my article here

Thanks! 😄 👍

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions