Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm very new to this so please forgive the questions possibly ill-stated nature.

Firstly is this even a valid way to speedtest:

public function L1() {

        tree.x = 200;
        tree.y = 200;
        tree.healthPoints = 0;
        var myTimer:Timer = new Timer(100,60);
        addEventListener(Event.ENTER_FRAME, speedTest)

    function someFunction(event:TimerEvent) {
    public function speedTest (e:Event) {
        if (tree != null) {
            do { tree.healthPoints += 1; } 
            while (tree.healthPoints < 10000) ;
            tree.healthPoints = 0;
                trace (t);


Secondly: I want to actually speed-test the entire game somehow to check if adding new features or rewriting current features actually optimizes the game or not.

What are some ways to do this?

share|improve this question
up vote 1 down vote accepted

That doesn't seem like a very useful way to do it IMO. Any profiling methods should introduce a consistent overhead, but relying on the callbacks may reduce accuracy.

Try using the Date class. Or better yet, a legit profiler like The Miner

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.