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

Performance compared to wasm32 #31

Open
sbc100 opened this issue Oct 28, 2022 · 3 comments
Open

Performance compared to wasm32 #31

sbc100 opened this issue Oct 28, 2022 · 3 comments

Comments

@sbc100
Copy link
Member

sbc100 commented Oct 28, 2022

I got some initial performance numbers by running the emscripten benchmark suite under v8:

                        v8 v8-wasm64
                  base64 1.000	 1.234   size: 1.065
            conditionals 1.000	 1.003   size: 1.112 
                    copy 1.000	 0.997   size: 1.110
             corrections 1.000	 0.985   size: 1.109
           corrections64 1.000	 1.003   size: 1.110
                fannkuch 1.000	 1.161   size: 1.075
             fasta_float 1.000	 1.149   size: 1.075
                  havlak 1.000	 1.370   size: 1.110
                     ifs 1.000	 1.018   size: 1.110
         matrix_multiply 1.000	 1.162   size: 1.087
                  memops 1.000	 1.163   size: 1.088
                  primes 1.000	 1.016   size: 1.112
          primes_nocheck 1.000	 1.000   size: 2.020
                skinning 1.000	 1.040   size: 1.067
               zzz_box2d 1.000	 1.182   size: 1.043
                    mean         1.098         1.152  (-primes_nocheck: 1.090)

Looks like about 10% performance hit (presumably a combination of extra bounds checks and larger data structures), and about 10% code size increase. The size increase probably warrants more investigation since I wouldn't expect the larger pointer sizes to show up very much in the binary (just the static data structures of which I doubt there are that many).

@sbc100
Copy link
Member Author

sbc100 commented Oct 28, 2022

benchmarks.txt

@sbc100
Copy link
Member Author

sbc100 commented Oct 28, 2022

I think the size regressions are because I was measuring both JS and wasm sizes. I will re-measure with just wasm sizes.

@tbuchs
Copy link

tbuchs commented Jun 25, 2024

Do you know if this can still be considered as a good reference value?

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

No branches or pull requests

2 participants