Comments (3)
Right now we are working on performance optimization and bug fixing as we head towards v1.0.0, so this is a good case to benchmark against.
Could you please tell me the dimensions of the image, and if possible the specs of the computer?
from bild.
I optimized the Rotate function for special angles (for ex.: 90, 180, 270...), as these angles don't need supersampling when rotating. Now it performs much faster.
benchmark old ns/op new ns/op delta
BenchmarkRotation256-8 7858767 876950 -88.84%
BenchmarkRotation512-8 29263657 4050521 -86.16%
BenchmarkRotation1024-8 119374673 15880952 -86.70%
BenchmarkRotation2048-8 466060630 89323900 -80.83%
BenchmarkRotation4096-8 2033882420 388791904 -80.88%
BenchmarkRotation8192-8 8476689250 1663045960 -80.38%
benchmark old allocs new allocs delta
BenchmarkRotation256-8 21 7 -66.67%
BenchmarkRotation512-8 21 7 -66.67%
BenchmarkRotation1024-8 21 7 -66.67%
BenchmarkRotation2048-8 21 7 -66.67%
BenchmarkRotation4096-8 21 7 -66.67%
BenchmarkRotation8192-8 21 7 -66.67%
benchmark old bytes new bytes delta
BenchmarkRotation256-8 4457292 524540 -88.23%
BenchmarkRotation512-8 17826589 2097424 -88.23%
BenchmarkRotation1024-8 71303960 8388876 -88.24%
BenchmarkRotation2048-8 285213464 33554698 -88.24%
BenchmarkRotation4096-8 1140851480 134218001 -88.24%
BenchmarkRotation8192-8 4563403544 536871168 -88.24%
Also I partly optimized the Resize function which is part of how supersampling is handled, so non-special angles should see a small performance increase. More optimizations should be made on that.
from bild.
FWIW The image was 6000x4000. This was on a MBP, 2.2ghz, 16gb ram.
from bild.
Related Issues (20)
- Running bild with WASM HOT 1
- [Feature] Halftone (dither) picture filter HOT 1
- Add the ability to pass heuristics value in effect.Grayscale HOT 4
- Canvas and layers feature
- Readme code example should mention the importance of gamma correction. HOT 2
- Test failures on AArch64
- [Feature]Perlin noise HOT 5
- imgio.PNGEncoder() not working HOT 3
- [bug] runtime panic when rotating some images HOT 2
- some of the function comment docs are out-of-date or incorrect
- Feature Request: Lens effect support
- Strongly recommended add func about translate normal pic to round pic,it is very useful when create some picture. HOT 1
- Feature request: normalization
- transform.Crop performance goes bad when rect size is small
- compare two histogram image
- General Inquiry
- Feature request: Perspective transform
- please add webp support
- Feature request: contours
- blur.Gaussian: radius is non-standard and not commensurate with sigma
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 bild.