Giter Club home page Giter Club logo

Comments (3)

anthonynsimon avatar anthonynsimon commented on May 23, 2024

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.

anthonynsimon avatar anthonynsimon commented on May 23, 2024

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.

Petah avatar Petah commented on May 23, 2024

FWIW The image was 6000x4000. This was on a MBP, 2.2ghz, 16gb ram.

from bild.

Related Issues (20)

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.