Giter Club home page Giter Club logo

Comments (5)

badlogic avatar badlogic commented on May 2, 2024

From badlogicgames on June 17, 2010 16:53:33

i'd be surprised if that would have any impact on your perfomance. i'm aware of the slightly worse performance of generic collections compared to arrays but in all my tests this was never a problem. what device/android version are you testing this on?

please don't file something like this as a defect but rather as a request tor enhancement.

Status: Accepted

from libgdx.

badlogic avatar badlogic commented on May 2, 2024

From [email protected] on June 17, 2010 17:04:09

Well I can only go by the general percentages in DDMS and changing all my ArrayList's to list[] reduced their overall percentage.

My hardware is a Hero CDMA running android2.1

My use case is storing box2d bodies in an array that I iterate over after every step, in some cases where I have 15-30 bodies, this produces a faster result. The reason I allocate the bodies before world.step'ing is I was seeing better results simply deactivating bodies and transforming-and-reactivating bodies as needed versus creating and destroying bodies. I also make sure to only call various jni bits once like getWorldCenter only and store it in a seperate array for other things that need access to it.

I would love to actually file these requests correctly, and every time I click new issue, im looking for where I can set the type. Yet I never see it. Maybe I'm blind, but its just not there as an end user.

from libgdx.

badlogic avatar badlogic commented on May 2, 2024

From [email protected] on June 17, 2010 17:10:09

off subject and on the issue-type, I actually have a blank code project on google-code here, I went over to the issues, clicked "New Issue" and I have a plethora of options to set. Not sure of the specifics, but filing a new issue on libgdx does not present anything more then a title, description, and submit button.

from libgdx.

badlogic avatar badlogic commented on May 2, 2024

From [email protected] on June 17, 2010 17:30:04

On subject, to comment on overall speed improvement of methods making .get calls versus array[sub], each one changed contributed about a 2% improvement to overall performance, for a cumulative 5% performance increase at the current state of my project. So maybe it doesn't seem like a big deal, but all these bits add up and I'm not sure what the benefit of using an ArrayList is if one already knows the size of the array to be made thats in question. In the case of ArrayList usage, its needlessly slower (by any margin) and part of a function (Mesh.render) that is liable to get called alot depending on the application.

If there's a pragmatic benefit to ArrayList usage that libgdx is taking advantage of, then maybe its a moot point and a fair trade off

from libgdx.

badlogic avatar badlogic commented on May 2, 2024

From badlogicgames on June 18, 2010 05:07:03

Fixed in SVN to be released. thanks for the suggestion

Status: Fixed
Owner: badlogicgames

from libgdx.

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.