Skip to content

Confused about performance #28

Open
@GitHobi

Description

@GitHobi

Hi there.
I'm new to WebAssembly and AssemblyScript ... I was looking to speed up JavaScript code and started to play around with it.

So I had a question:
I was playing with the Mandelbrot demo.
What I did is, I ported the code from the ts file, directly to the js file ... so I can calculate the mandelbot set either by the code in the compiled webassembly - or directly within the javascript code. I expected the webassmbly calculation to be (significantly?) quicker.

But actually these are my results:

Using Chrome: JavaScript Code ~ 530ms ... WebAssembly ~ 1000ms
Using Firefox: JavaScript Code ~ 580ms ... WebAssembly ~ 570ms
("limit" set to do 800 iterations. My PC is running windows, AMD Ryzen 9 3900X)

So it seems that in Chrome the WebAssembly version is half as fast as the normal JavaScript version ... in Firefox both version are at least equal in performance.

Is this expected? Or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy