flat assembler
Message board for the users of flat assembler.

Index > IDE Development > Clock Cycle/Byte size counter?

Author
Thread Post new topic Reply to topic
Loplin



Joined: 13 Feb 2004
Posts: 19
Loplin
I think it would be interesting, and uniquq, if Fresh were to someday add this;
on the left of every line number, it would display how many clock cycles the current line of asm will use and it will display how much space it will take up in the final executable.

This would be very useful for code optimization, but would be a lot of work.

/Loplin

_________________
If I have a penny and you have a penny and we exchange pennies, we will both have one penny;but, if I have an idea and you have an idea and we exchange ideas, we will both have two ideas.

http://menuet.homelinux.net
Post 01 Mar 2005, 19:46
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Loplin wrote:
I think it would be interesting, and uniquq, if Fresh were to someday add this;
on the left of every line number, it would display how many clock cycles the current line of asm will use and it will display how much space it will take up in the final executable.

This would be very useful for code optimization, but would be a lot of work.

/Loplin


Well, about the size of the line - it is not very hard to be implemented, because even now, Fresh collects big amount of information about the compiled binary... the problem is that just now there are more important things...
The time of execution is completly another deal - we need to built-in some kind of profiler or something to do this job. I though about such thing, but it is too early.

Regards
Post 01 Mar 2005, 19:54
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
I can imagine a byte size counter is possible, but displaying the clock cycles an instruction will use is just unrealistic in our days. there are so many unlinear CPU optimizations, that this will become garbage. Well, you can try to determine the time an instruction actually uses with some kinda RDTSC and stuff, but this value will however be different on other CPUs
Post 02 Mar 2005, 09:16
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
MCD wrote:
I can imagine a byte size counter is possible, but displaying the clock cycles an instruction will use is just unrealistic in our days. there are so many unlinear CPU optimizations, that this will become garbage. Well, you can try to determine the time an instruction actually uses with some kinda RDTSC and stuff, but this value will however be different on other CPUs


Yes, timing of particular instructions is almost imposible and also useless IMHO. But some kind of profiler measuring the time of execution of procedures and blocks of code is possible and pretty usefull.
I am too busy now with other subsystems of Fresh, but if someone wants to implement profiler, I can provide any help about Fresh internals, etc.

Regards.
Post 02 Mar 2005, 09:58
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Marco Leise



Joined: 19 Apr 2005
Posts: 5
Marco Leise
I second that Smile
Just yesterday I thought about that. It's just a passion for me to write code as small as possible, but there are examples where this could be usefull... bootsectors, drivers and other stuff that stays in memory or just programs delivered on disk images like virus scanners. ...or maybe viruses themselves? just kidding.
Yes a 'size of opcode' is definetly cool. What is the longest code? Six bytes? What about a display column at the right, that can be used for different stuff and you can switch between the different display modes. Additionally to the proposals made above (display code length or cpu cycles) it could also show you the processors on which the instr. is supported. For the code length: It could be displayed as a bar from 0 to 6 or something with marks.
|>|>|>| | | |
for three bytes for example. Depends on how much of the editor are it would cost though, but I like some difference in the 'data presentation' so I don't mix it with line numbers or so. What do you think? It's also not that hard to implement.
Post 20 Apr 2005, 15:46
View user's profile Send private message ICQ Number Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY
I like the idea of size counter. Could it be done for FASMW?
Post 24 Sep 2005, 04:23
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
If you're going to write a profiler, you're better off not integrating it directly into fresh. It's a complicated project, and lends itself better to standalone usage.
Post 24 Sep 2005, 06:23
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.