obartra / ssim

🖼🔬 JavaScript Image Comparison
http://obartra.github.io/ssim
MIT License
299 stars 14 forks source link

perf(rgb2gray): deloop and remove Math.round. Triggers a 66% improve… #265

Closed omnisip closed 4 years ago

omnisip commented 4 years ago

Uses Uint8Array with 0.5 addition to match how this round behavior works in Weber SSIM. Single loop instead of a double loop. Inlined the luma function. Uses a shallow copy with Array.from to ensure that no unnecessary copies are made.

obartra commented 4 years ago

This is great!

obartra commented 4 years ago

:tada: This PR is included in version 3.1.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: