It is currently Fri Dec 06, 2019 12:28 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 87 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Analyzer 2.0b for V4
PostPosted: Thu Oct 13, 2005 10:33 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Dec 20, 2003 6:19 pm
Posts: 468
Location: Switzerland
After everybody knows that I'm interested in optimizing and have announced
the Optimizer, I built today another tool inspired by Intel's VTune!

It's called Analyzer :lol:

Before I forget something:
Download: Analyzer
And take a look at the help file!

So what's its purpose?
It's an IDE plug-in that modifys the PB file compiled with Compile/Run so
that (nearly) every line is tested for its runtime! After you quit your program
there will be an analysis.txt in the source directory which shows you the
time critical lines of code in your code :)

There will be interesting results like:
Code:
Line 71:   Time 10918         StartDrawing(ScreenOutput())
Line 38:   Time 3951         OpenScreen(#SCREEN_WIDTH, #SCREEN_HEIGHT,32,Test)
Line 1:   Time 127         InitSprite()
Line 27:   Time 76         DisplayTransparentSprite(2,newposx,#Posy)
Line 85:   Time 75         Kraftaufwand()
Line 74:   Time 54         DrawText(Kraft  + a$)
Line 69:   Time 46         ClearScreen(125, 125, 125)
Line 88:   Time 30         DisplayTransparentSprite(2,#Posx,#Posy)
Line 89:   Time 11         DisplayTransparentSprite(1,MouseX(),MouseY())
Line 68:   Time 11         FlipBuffers()

So you can concentrate on the real bottlenecks of your program and don't
waste your awfully important time in senseless optimizations :wink:

There are some other possibilities of measure the time with special kinds
of comments, read the help file :P

So have fun and make some great and fast programs!

Source included!


greetz
Remi

_________________
Athlon64 3700+, 1024MB Ram, Radeon X1600


Last edited by remi_meier on Sat Feb 04, 2006 4:16 pm, edited 5 times in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Oct 13, 2005 10:36 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 20, 2005 12:48 pm
Posts: 1104
remi_meier strikes back with another hot release! Very nice and usefull tool! Keep on your great work! :D

_________________
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Oct 13, 2005 11:10 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 22, 2004 4:12 pm
Posts: 2448
Location: Norway
I always wanted something like this!!! :D
Thank you remi_meier!

_________________
I like logic, hence I dislike humans but love computers.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Oct 13, 2005 11:35 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Aug 06, 2003 2:49 pm
Posts: 362
Location: Venice - Italy, Japan when possible.
You made a profiler! (this is the official name for this type of utility)

GREAT! :)

added:
The time are cumulative, right?
So if I run the program for 20 seconds or for 30 minutse, the results aren't comparable.
If you count how many time every part is executed, we could know the absolute slowness of every part. (total time/ nr of times)
this makes sense?

_________________
Universal Videogame List


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 10:15 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Dec 20, 2003 6:19 pm
Posts: 468
Location: Switzerland
Cool I made a profiler :lol:

@Blade
Yes, the time is cumulative to see how the whole runtime is spread over
the whole code.
> the results aren't comparable.
Right, I didn't think of that... Ok, for the next release there will be also
percentage and number of times called!

Thanks for the feedback!

greetz
Remi

DONE!

_________________
Athlon64 3700+, 1024MB Ram, Radeon X1600


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 11:13 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:51 pm
Posts: 2808
Location: Portugal, Lisbon
You're the MAN !!! 8)

_________________
Software: http://xipa.org
Elevator Maintenance: http://central-elevadores.pt
Good web hosting!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 11:49 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Dec 20, 2003 6:19 pm
Posts: 468
Location: Switzerland
Thx :)

Now I've also added a tool called 'Merger' to the ZIP which can merge all
include files of a whole project into one! It's useful cause the Analyzer
wont modify any include files.
So you can easily merge a whole project into one file and analyze it!

greetz
Remi

_________________
Athlon64 3700+, 1024MB Ram, Radeon X1600


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 1:23 pm 
Offline
Addict
Addict

Joined: Wed Aug 24, 2005 8:39 am
Posts: 2736
Location: Southwest OH - USA
Wow - this is one NICE tool.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 3:56 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Dec 20, 2003 6:19 pm
Posts: 468
Location: Switzerland
Sorry!
Thanks to va!n, I could recognize the failures of the Merger!
I've modified a bit..

Lines like
Debug 1 : IncludeFile "xx.pbi"
will now be recognized but 'Debug 1' will be removed! The whole line will
be removed!

In lines like
IncludeFile "xx.pbi" : IncludeFile "yy.pbi"
only the first IncludeXX will be recognized and the whole line will be deleted!

I would be very thankful if somebody would write a better tool, but for me
it stopps here! It should be a help tool for the Analyzer and that's what it
is! I won't write a whole PB parser :lol:

greetz
Remi

_________________
Athlon64 3700+, 1024MB Ram, Radeon X1600


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 8:12 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Apr 03, 2005 2:14 am
Posts: 372
Location: England
@remi_meier

Thankyou this is real cool, now there is no excuse for me to write slow code :) :roll: :lol: :wink: :D


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 10:07 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Jun 11, 2003 9:33 pm
Posts: 4580
Location: Spa, relaxing and thinking, and learning...
Good idea have you had Remi. Thank you.
Now we can say Fred "hey, this command or this other, is too much slow" :D

_________________
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 10:48 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Dec 20, 2003 6:19 pm
Posts: 468
Location: Switzerland
Thx for the nice feedback :)

I have uploaded a new ZIP (200kb) with a better looking help file in PDF
format.

I want your feature requests! Some that are on low priority (cause really
hard to implement):
- CPU Usage (Hard without PBOSL and it surely will add some overhead of
execution time per line!)
- Auto declare loops and procedures as blocks (Cause a procedure can be
left with procedurereturn everywhere in the code, break for loops!)

Is there a 'need' for a GUI which shows you colored the special lines in the
source code and some other cool features? It just would interpret the
analysis.txt and combine it with the real source code! (but a lot of work..)

Are the results realistic and useful? Is there need for a more accurate
Version? (lines like a = b + c will never be really accuratly measured)

At the moment it's open source, if GUI will be added there is surely potential
of a community project. Would that make sense?

greetz
Remi

_________________
Athlon64 3700+, 1024MB Ram, Radeon X1600


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 10:50 pm 
Some people are just too smart for their own good :P Thank you for another great tool :D


Top
  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 14, 2005 11:03 pm 
Offline
Always Here
Always Here
User avatar

Joined: Sat Aug 30, 2003 5:58 pm
Posts: 5883
Location: Denmark
Thanks!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Oct 15, 2005 12:07 am 
Offline
Addict
Addict
User avatar

Joined: Wed Apr 20, 2005 12:48 pm
Posts: 1104
@remi_meier:
10 points for your great tool! I like your work and this tool! :D
Its cool to see you are inspired by the video i send you 8)

_________________
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 87 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye