Code Monkey home page Code Monkey logo

elm-webgl-math's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

elm-webgl-math's Issues

Collecting benchmark results

Please run the benchmark here:
https://zinggi.github.io/elm-webgl-math/
And post your result here.
Please use this tool to generate a nice markdown.
To get a nice output for chrome mobile I used USB remote debugging to copy the html to here. If you know an easier way, please let me know!

Here are the results from my laptop:

Laptop: Intel® Core™ i7-6500U CPU @ 2.50GHz × 4 - 15.6 GiB RAM

Chrome 53.0.2785.143 on Linux 64-bit

suite benchmark ops/sec error% samples
Matrix exponentiation: A^1000 M4.pow 5699 10.7 16
Matrix exponentiation: A^1000 RefM4.pow 6310 8.2 27
Matrix exponentiation: A^10000 M4.pow 645 6.0 26
Matrix exponentiation: A^10000 RefM4.pow 662 3.1 26
Matrix exponentiation: A^100000 M4.pow 66 3.7 23
Matrix exponentiation: A^100000 RefM4.pow 70 1.8 23
Matrix exponentiation: A^1000000 M4.pow 7 2.0 11
Matrix exponentiation: A^1000000 RefM4.pow 7 1.4 11
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 1000 times. V4.add / scale 14378 2.2 27
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 1000 times. RefV4.add / scale 5386 4.5 15
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 10000 times. V4.add / scale 1345 8.6 25
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 10000 times. RefV4.add / scale 566 2.4 19
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 100000 times. V4.add / scale 137 7.3 25
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 100000 times. RefV4.add / scale 56 3.4 22
Real world application: makeTransform 1000 times. M4.makeTransform 1894 5.3 25
Real world application: makeTransform 1000 times. M4.makeTransformNaive 1277 8.7 25
Real world application: makeTransform 1000 times. RefM4.makeTransform 754 5.9 27
Real world application: makeTransform 10000 times. M4.makeTransform 195 5.2 27
Real world application: makeTransform 10000 times. M4.makeTransformNaive 126 7.4 24
Real world application: makeTransform 10000 times. RefM4.makeTransform 79 1.6 23
Real world application: makeTransform 100000 times. M4.makeTransform 19 8.8 17
Real world application: makeTransform 100000 times. M4.makeTransformNaive 14 2.5 13
Real world application: makeTransform 100000 times. RefM4.makeTransform 8 2.1 12
Rotate vector around 1000 times M4.transform 13050 6.5 23
Rotate vector around 1000 times RefM4.transform 6357 2.0 17
Rotate vector around 10000 times M4.transform 1446 1.9 26
Rotate vector around 10000 times RefM4.transform 591 8.3 26
Rotate vector around 100000 times M4.transform 123 12.8 23
Rotate vector around 100000 times RefM4.transform 63 2.7 22

Firefox 49.0 on Linux 64-bit

suite benchmark ops/sec error% samples
Matrix exponentiation: A^1000 M4.pow 8659 1.9 27
Matrix exponentiation: A^1000 RefM4.pow 2501 1.3 28
Matrix exponentiation: A^10000 M4.pow 758 2.1 27
Matrix exponentiation: A^10000 RefM4.pow 253 2.6 25
Matrix exponentiation: A^100000 M4.pow 99 2.0 23
Matrix exponentiation: A^100000 RefM4.pow 27 2.0 18
Matrix exponentiation: A^1000000 M4.pow 10 1.9 14
Matrix exponentiation: A^1000000 RefM4.pow 3 1.4 7
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 1000 times. V4.add / scale 16119 3.2 26
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 1000 times. RefV4.add / scale 1433 6.3 24
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 10000 times. V4.add / scale 1567 2.8 27
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 10000 times. RefV4.add / scale 154 4.7 25
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 100000 times. V4.add / scale 154 5.0 25
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 100000 times. RefV4.add / scale 17 1.2 15
Real world application: makeTransform 1000 times. M4.makeTransform 5876 9.6 24
Real world application: makeTransform 1000 times. M4.makeTransformNaive 2090 2.5 24
Real world application: makeTransform 1000 times. RefM4.makeTransform 186 6.2 23
Real world application: makeTransform 10000 times. M4.makeTransform 560 8.6 21
Real world application: makeTransform 10000 times. M4.makeTransformNaive 208 3.7 25
Real world application: makeTransform 10000 times. RefM4.makeTransform 21 2.5 18
Real world application: makeTransform 100000 times. M4.makeTransform 63 2.3 21
Real world application: makeTransform 100000 times. M4.makeTransformNaive 17 21.5 15
Real world application: makeTransform 100000 times. RefM4.makeTransform 2 4.3 6
Rotate vector around 1000 times M4.transform 7523 7.1 25
Rotate vector around 1000 times RefM4.transform 2592 8.3 27
Rotate vector around 10000 times M4.transform 773 3.3 24
Rotate vector around 10000 times RefM4.transform 272 6.4 25
Rotate vector around 100000 times M4.transform 69 8.4 21
Rotate vector around 100000 times RefM4.transform 28 4.2 18

My phone, Sony Xperia Z1

Chrome Mobile 53.0.2785.124 on Android 5.1.1

suite benchmark ops/sec error% samples
Matrix exponentiation: A^1000 M4.pow 1150 10.2 18
Matrix exponentiation: A^1000 RefM4.pow 1129 6.1 21
Matrix exponentiation: A^10000 M4.pow 125 7.3 21
Matrix exponentiation: A^10000 RefM4.pow 119 7.9 22
Matrix exponentiation: A^100000 M4.pow 12 19.8 12
Matrix exponentiation: A^100000 RefM4.pow 12 11.1 15
Matrix exponentiation: A^1000000 M4.pow 1 5.4 6
Matrix exponentiation: A^1000000 RefM4.pow 1 9.3 6
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 1000 times. V4.add / scale 2716 11.3 24
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 1000 times. RefV4.add / scale 799 14.7 21
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 10000 times. V4.add / scale 264 8.9 21
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 10000 times. RefV4.add / scale 91 6.7 20
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 100000 times. V4.add / scale 30 2.8 17
Useless vector addition/scale: f a b = f (a+b) (-0.999999 * b), 100000 times. RefV4.add / scale 9 7.1 12
Real world application: makeTransform 1000 times. M4.makeTransform 333 9.4 22
Real world application: makeTransform 1000 times. M4.makeTransformNaive 132 13.3 19
Real world application: makeTransform 1000 times. RefM4.makeTransform 112 5.9 21
Real world application: makeTransform 10000 times. M4.makeTransform 37 3.0 19
Real world application: makeTransform 10000 times. M4.makeTransformNaive 13 32.2 12
Real world application: makeTransform 10000 times. RefM4.makeTransform 10 11.9 14
Real world application: makeTransform 100000 times. M4.makeTransform 4 5.8 8
Real world application: makeTransform 100000 times. M4.makeTransformNaive 2 12.6 6
Real world application: makeTransform 100000 times. RefM4.makeTransform 1 13.2 6
Rotate vector around 1000 times M4.transform 2659 6.5 9
Rotate vector around 1000 times RefM4.transform 1204 22.9 21
Rotate vector around 10000 times M4.transform 245 9.3 21
Rotate vector around 10000 times RefM4.transform 119 12.0 20
Rotate vector around 100000 times M4.transform 27 4.7 16
Rotate vector around 100000 times RefM4.transform 12 13.2 12

Unable to build benchmark according to instructions

First: library is very interesting and would be directly useful for a couple of projects of mine, so thank you.

Followed the instructions at https://github.com/Zinggi/elm-linear-algebra/tree/master/bench

nw@salad ~/elm/elm-linear-algebra/bench master$ git clone https://github.com/fredcy/elm-benchmark
Cloning into 'elm-benchmark'...
remote: Counting objects: 483, done.
remote: Total 483 (delta 0), reused 0 (delta 0), pack-reused 483
Receiving objects: 100% (483/483), 266.72 KiB | 202.00 KiB/s, done.
Resolving deltas: 100% (161/161), done.
Checking connectivity... done.
nw@salad ~/elm/elm-linear-algebra/bench master$ elm package install --yes
Starting downloads...

  ● elm-lang/virtual-dom 1.1.1
  ● elm-lang/html 1.1.0
  ● elm-community/elm-linear-algebra 2.0.3
  ● elm-lang/core 4.0.5
  ● ggb/numeral-elm 1.2.2

Packages configured successfully!
nw@salad ~/elm/elm-linear-algebra/bench master$ elm make Main.elm --output elm.js
Success! Compiled 50 modules.                                       
Successfully generated elm.js
nw@salad ~/elm/elm-linear-algebra/bench master$ chromium-browser index.html 
Created new window in existing browser session.

When I switch to Chromium I get "See javascript console if no output appears below."
The console sez:

file://cdn.jsdelivr.net/pure/0.6.0/pure-min.css Failed to load resource: net::ERR_FILE_NOT_FOUND
file://cdn.jsdelivr.net/lodash/4.13.1/lodash.min.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file://cdn.jsdelivr.net/platform.js/1.3.1/platform.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file://cdn.jsdelivr.net/benchmarkjs/2.1.0/benchmark.js Failed to load resource: net::ERR_FILE_NOT_FOUND
elm.js:11114 Uncaught ReferenceError: Benchmark is not defined
index.html:23 Uncaught ReferenceError: Elm is not defined

Suggestion: why don't you just create a gh-pages branch with the benchmark built & deployed, so that users can just click there and give you the benchmark results, without any clone/build shenanigans?

Ambiguous license

Hi, the license info in elm-package.json (BSD3) and LICENSE (MIT) are different. Possible to ensure these are the same?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.