Coder Social home page Coder Social logo

Comments (4)

erik-kallen avatar erik-kallen commented on August 30, 2024

try/finally does not swallow exceptions. Also, the try/finally adds little overhead according to the tests. Removing the dispose() call altogether does improve performance on Chrome but not on the iPad, but if this is removed we have other problems such as finally blocks in iterator blocks not being executed. (btw, if you foreach over an array it should be optimized to a for loop).

from saltarellecompiler.

dested avatar dested commented on August 30, 2024

Sorry I jumped the gun, obviously I was dealing with a separate issue with an exception.

Thats interesting about the ipad, must be in the way it inlines the method differently than chrome. My issue was foreaching over an ienumerable that was an array. I suppose an answer is to be careful during performance critical situations to iterate over an array rather than an ienumerable. Thanks for the insight.

from saltarellecompiler.

erik-kallen avatar erik-kallen commented on August 30, 2024

The overhead is also likely to be less when the loop actually does something (overhead = O(1), loop work = O(n))

from saltarellecompiler.

dested avatar dested commented on August 30, 2024

Would you consider adding the optimization for arrays to List<T>'s as well? It seems safe enough

from saltarellecompiler.

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.