back

by Rochus·6y ago·view on hn ↗
Thanks for the info. My laptop has about the same age. Maybe you have the much faster graphics chip than my HP EliteBook.
1 comments
Drawing a few boxes with webgl has nothing to do with a graphics card. This is about webasm which is single core performance.
From https://en.wikipedia.org/wiki/WebGL:

"WebGL is fully integrated with other web standards, allowing GPU-accelerated usage of physics and image processing and effects as part of the web page canvas"

So I would guess that when your graphics chip is faster than mine you get a higher performance.

These two things have nothing to do with each other.

This is a physics engine running on your CPU, not your GPU.

The webgl window is run with your GPU and is extremely simple. Drawing a few dozen boxes is something graphics cards from 22 years ago would have no problem with.

And yet the graphics are actually the performance bottleneck.

I tried that on a 4k monitor, and it ran quite slowly. I then made the window smaller, and it ran much faster. It's bottlenecked on the graphics, not on the physics engine.

I think that says a lot more about your combination of software and hardware than webasm.

If someone says "webasm is slow, this demo took 45 seconds to run" and you say "it ran slow for me when I made the window so big that between my browser's webgl implementation, my gpu drivers and my graphics card, a hundred cubes make everything run at 1/10th the speed" what point is that making?

This subthread started because two people saw wildly different performance for the same demo, and some attributed that to wasm. My point was that given that the demo seems heavily dependent on graphics performance, it's unlikely that the observed performance differences had anything to do with wasm.
The demo is just a few boxes, it is not graphics limited. A 4k webgl window might have some sort of bottleneck in your web browser, drivers or gpu. The demo is a physics simulation though. I don't know why you would create a situation where anything would slow down on your computer while having nothing to do with CPU speed and then talk about it in a thread about webasm.
It doesn't matter how many boxes there are if the shaders run in software, which is going to be the case on really old integrated graphics.
I'm not sure why anyone would think it makes sense to use a computer so ancient it can't run webgl and then use that to talk about webasm not being fast on a webgl demo.