BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fastcode Library Design
Goto page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language BASM
View previous topic :: View next topic  
Author Message
Dennis
Guest





PostPosted: Tue Oct 11, 2005 8:23 am    Post subject: Fastcode Library Design Reply with quote



Hi

Michael and John are working on the design of a new type of library. I
think
it is a good idead if they present the design here. Then we can discuss it
and adjust it if needed.

Michaels library can exemplify the design.

I see the new design as a suggestion for an extension of the current
design.

The current design has 4 different library types and this is a 5. type -
IMHO.

I have a 6. type published in the unofficial library section. It consist
of
2 units; Math and Strings. Such a unit contains all the winners from one
target. I have only implemented the a library for the Blended target. All
functions are named the same as the current RTL functions. Just plug in
the
unit in the correct uses sections and you will compile against all the
Blended target winners.

Because we do not want 713 different library types if 699 is enough we
should carefully discuss the overall design before starting to create new
library types.

Best regards
Dennis


----------------------------------------
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at få 1459 spam-mails.
Betalende brugere får ikke denne besked i deres e-mails.
Hent gratis SPAMfighter her: www.spamfighter.dk


Back to top
Dennis
Guest





PostPosted: Tue Oct 11, 2005 8:32 am    Post subject: Re: Fastcode Library Design Reply with quote



Hi

Each library type has its own unique set of strengths and weaknesses. Help
me enumerate them.

Direct Calling:

Pro

Simple
The smallest possible exe
No additional RAM usage.

Cons

Compiled for one target only

Conditional Compilation:

Pro

The smallest possible exe
No additional RAM usage.

Cons

Compiled for one target only

CPU ID based:

Pro

The fastest function for the given target is automatically used.

Cons

All functions are compiled into the exe -> a fat exe

Patching

Pro

All calls to RTL functions from within the RTL is replaced without the need
of the RTL to be recompiled.
The fastest function for the given target is automatically used.

Cons

A fat exe.
One function is 4 kB big in RAM always ????
All functions are loaded into RAM, even if not used.
Not all people feel comfortable with some "hacking" they do not understand.
A complex solution

Best regards
Dennis


Back to top
Dennis
Guest





PostPosted: Tue Oct 11, 2005 8:39 am    Post subject: Re: Fastcode Library Design Reply with quote



Hi

Each library type has its own unique set of strengths and weaknesses. Help
me enumerate them.

Direct Calling:

Pro

Simple
The smallest possible exe
No additional RAM usage.
No extra indirection
The fastest possible.

Cons

Compiled for one target only
The unit can contain the same function multiple times if it is a winner on
multiple targets. This makes the unit bigger as necessary which takes up HD
space on the developer machine. Maintanence is simpler if only one copy of a
function is included.

Conditional Compilation:

Pro

The smallest possible exe
No additional RAM usage.
No extra indirection
The fastest possible.

Cons

Compiled for one target only

CPU ID based:

Pro

The fastest function for the given target is automatically used.

Cons

All functions are compiled into the exe -> a fat exe
Adds one extra layer of indirection.
Not as simple as Direct calling or conditional compilation.
Depends on the CPUID unit

Patching

Pro

All calls to RTL functions from within the RTL is replaced without the need
of the RTL to be recompiled.
The fastest function for the given target is automatically used.

Cons

A fat exe.
Adds one extra layer of indirection.
One function is 4 kB big in RAM always ????
All functions are loaded into RAM, even if not used.
Not all people feel comfortable with some "hacking" they do not understand.
A complex solution
Depends on the CPUID unit

Best regards
Dennis


Back to top
Dennis
Guest





PostPosted: Tue Oct 11, 2005 8:45 am    Post subject: Re: Fastcode Library Design Reply with quote

Hi "Aleksandr Sharahov

Quote:
I think new design is good.

OK

Quote:
It makes the libraries more usable and controlled.

How? Compared to what?

Quote:
I usually use the same design in practice
for interface with DLL of other developers

OK

Quote:
If someone really wants to get the last tick
by direct calling he can copy the function
from our sources.

No they can use the direct calling libraries.

Regards
Dennis



Back to top
John O'Harrow
Guest





PostPosted: Tue Oct 11, 2005 9:15 am    Post subject: Re: Fastcode Library Design Reply with quote


"Dennis" <marianndkc (AT) home3 (DOT) gvdnet.dk> wrote

Quote:
Hi "Aleksandr Sharahov

I think new design is good.

OK

It makes the libraries more usable and controlled.

I also prefer the new design.

Quote:
How? Compared to what?

I usually use the same design in practice
for interface with DLL of other developers

OK

If someone really wants to get the last tick
by direct calling he can copy the function
from our sources.

No they can use the direct calling libraries.

Even with the new library design, you could still direct call the fastest
function for any target.

Dennis, you ask for peoples opinions and them immediately tell them they are
wrong. Please try to keep the discussion relevant. and please don't take
any change proposals as a personal criticism.

regards,
John



Back to top
Aleksandr Sharahov
Guest





PostPosted: Tue Oct 11, 2005 9:39 am    Post subject: Re: Fastcode Library Design Reply with quote

Hi Dennis,

I think new design is good.
It makes the libraries more usable and controlled.

I usually use the same design in practice
for interface with DLL of other developers

If someone really wants to get the last tick
by direct calling he can copy the function
from our sources.

--
regards
Aleksandr


Back to top
Dennis
Guest





PostPosted: Tue Oct 11, 2005 9:44 am    Post subject: Re: Fastcode Library Design Reply with quote

Hi John

Quote:
I also prefer the new design.

How? Compared to what?

I usually use the same design in practice
for interface with DLL of other developers

OK

If someone really wants to get the last tick
by direct calling he can copy the function
from our sources.

No they can use the direct calling libraries.

Even with the new library design, you could still direct call the fastest
function for any target.

OK

Quote:
Dennis, you ask for peoples opinions and them immediately tell them they
are
wrong. Please try to keep the discussion relevant. and please don't take
any change proposals as a personal criticism.

John - I have tried to explain many times that the problem is that people
constantly disregard all we have done and start the same discusions over and
over again.

You just did it on the library design and the global rule for memory usage.

I do not take it personally.

All this endless noise just makes it impossible to move on. My everyday life
has been very sad lately because of all this.

People do not even read through the old stuff before suggestion we should do
everything in a new way.

In this thread we should try to settle the library design again.

Document it and stick to it.

You have no idea how difficult it is to manage a project of this size.

People make suggestions without thinking through the consequences.

Regards
Dennis



Back to top
Dennis
Guest





PostPosted: Tue Oct 11, 2005 10:21 am    Post subject: Re: Fastcode Library Design Reply with quote

Hi

The new library description from the Readme:

What is does ..

The following library will replace the current RTL
procedure & functions used by your applications with
faster, optimized for the latest processors.

Currently the following functions are supported:

CompareText, LowerCase, UpperCase, Pos, StrComp and StrCopy.
(and more to come ...)

... Usage ..

To use it must include the "Fastcode" unit in the first order
of your uses clauses of your delphi project. If you're using
and alternative memory manager and/or FastMove the order should
be like:

FastMM4,
FastMove,
FastCode,
... etc ...

Best regards
Dennis


Back to top
John O'Harrow
Guest





PostPosted: Tue Oct 11, 2005 10:34 am    Post subject: Re: Fastcode Library Design Reply with quote


"Dennis" <marianndkc (AT) home3 (DOT) gvdnet.dk> wrote

Quote:
Dennis, you ask for peoples opinions and them immediately tell them they
are
wrong. Please try to keep the discussion relevant. and please don't take
any change proposals as a personal criticism.

John - I have tried to explain many times that the problem is that people
constantly disregard all we have done and start the same discusions over
and
over again.

You just did it on the library design and the global rule for memory
usage.

Not relevant to this discussion. Leave that in the other thread.

Quote:

In this thread we should try to settle the library design again.

Document it and stick to it.

You have no idea how difficult it is to manage a project of this size.
People make suggestions without thinking through the consequences.

I have managed some very large projects, but again, this is not relevant to
this thread

Back to the subject - "Fastcode Library Design"

As you have stated, each existing library type (Direct Calling, Conditional
Compilation and CPUID based selection) have their own Pro's and Con's

In my opinion, the mere fact that we have 3 different libraries, each of
which can be very large files, is deterring people from using them. The
average Delphi high-level programmer wouldn't know which library to use, and
the apparent complexity (perhaps 1000's of lines of BASM code, can make some
people very nervous.

What I believe we need is a simple method to get the community as a whole to
accept and use Fastcode functions.

Michael has on the whole achieved this by providing just one unit per
Fastcode function, together with a few supporting units which hide any
complexity from the programmer.

In doing so, he has also removed much of the code duplication (at a cost of
a few cycles per call), resulting in much smaller units, which should also
be easier to support/maintain.

regards,
John



Back to top
Dennis
Guest





PostPosted: Tue Oct 11, 2005 11:58 am    Post subject: Re: Fastcode Library Design Reply with quote

Hi John

Which all means that you think we should scrap all the old libraries and
continue with this new design?

Dennis


Back to top
Dennis
Guest





PostPosted: Tue Oct 11, 2005 12:01 pm    Post subject: Re: Fastcode Library Design Reply with quote

Hi

I really think it is important to complete this list and add the new
suggested library to it. It will have it's own set of pro's and con's. Let
us bring them out into the open.

Best regards
Dennis


Back to top
John O'Harrow
Guest





PostPosted: Tue Oct 11, 2005 12:02 pm    Post subject: Re: Fastcode Library Design Reply with quote


"Dennis" <marianndkc (AT) home3 (DOT) gvdnet.dk> wrote

Quote:
Hi John

Which all means that you think we should scrap all the old libraries and
continue with this new design?

In "my" opinion, Yes.

But that's what this thread is discussing.

regards,
John



Back to top
Dennis
Guest





PostPosted: Tue Oct 11, 2005 12:05 pm    Post subject: Re: Fastcode Library Design Reply with quote

Hi John

Do you agree that we should evaluate pro's and con's and comparing to the
old libraries before continuing?

Best regards
Dennis


Back to top
John O'Harrow
Guest





PostPosted: Tue Oct 11, 2005 12:14 pm    Post subject: Re: Fastcode Library Design Reply with quote


"Dennis" <marianndkc (AT) home3 (DOT) gvdnet.dk> wrote

Quote:
Hi John

Do you agree that we should evaluate pro's and con's and comparing to the
old libraries before continuing?

Yes, of course.

I also think it is very important to get the views of users of Fastcode
functions/libraries, and not just the programmers involved in producing
them.

regards,
John



Back to top
Dennis
Guest





PostPosted: Tue Oct 11, 2005 12:15 pm    Post subject: Re: Fastcode Library Design Reply with quote

Hi John

Then please go to the subthread in this thread and help complete the list.

Best regards
Dennis


----------------------------------------
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at få 1463 spam-mails.
Betalende brugere får ikke denne besked i deres e-mails.
Hent gratis SPAMfighter her: www.spamfighter.dk


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language BASM All times are GMT
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.