Comments (3)
Really nice suggestion! I got curious so I made a quick benchmark running on 1000+ render tests in Mapbox GL JS, commenting out the "identical images" fast path — this change doesn't seem to have any noticeable performance gain, so probably not worth sacrificing code clarity for. The low impact is probably due to the fact that for every full-color colorDelta
call, we do 16 brightness-only ones, which benefit from the micro-optimization less.
Also an off-topic fun fact from the bench: it takes 18 times as long to png-decode the fixtures compared to pixelmatch running time. 😅
from pixelmatch.
The low impact is probably due to the fact that for every full-color colorDelta call, we do 16 brightness-only ones, which benefit from the micro-optimization less.
I mean, that's also a reduction from six to three multiplications, so percentage-wise the difference is even bigger ;)
Also an off-topic fun fact from the bench: it takes 18 times as long to png-decode the fixtures compared to pixelmatch running time. 😅
Ouch! Just shows how important it is do benchmark properly ;)
from pixelmatch.
Anyway, thanks for checking! It was a fun thought-exercise at least :)
from pixelmatch.
Related Issues (20)
- Prevent diff to be generated if threashold not reached HOT 2
- Image data size does not match width/height error since release 5.0.0 HOT 1
- The problem is me or the lib? HOT 2
- Image data: Uint8Array, Uint8ClampedArray or Buffer expected. HOT 3
- Comparing two pictures with different text returns no diff HOT 2
- View
- Sam
- Avoid generating diff images with no differences in it
- way to merge the diff HOT 1
- Image accuracy
- Weird comparator behaviour. HOT 1
- True or false for same image? HOT 2
- How can I group the differences or determine if there is a common change among them? HOT 1
- install in browser not work HOT 3
- Change Rate Limit Request HOT 1
- Can you provide an executable file for a windows? HOT 1
- can i get quantitative value? HOT 1
- CDN script error: module not defined HOT 2
- Following the doc but "Image data: Uint8Array, Uint8ClampedArray or Buffer expected." is still thrown. HOT 2
- CommonJS based require throws error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixelmatch.