Bee schreef:
TStrings is meant for GUI purposes. It's design and implementation are
not optimized.
Then its our task to optimize it more (and more) so it could as fast as
Perl. What I meant here is using standard or default FPC's
classes/units. ;) I don't count any third parties class/units/l
TStrings is meant for GUI purposes. It's design and implementation are
not optimized.
Then its our task to optimize it more (and more) so it could as fast as
Perl. What I meant here is using standard or default FPC's
classes/units. ;) I don't count any third parties class/units/library or
non
Or even better, give a clear problem description.
TASKS:
First, is to count number of words inside the document.
Second, is to count number of unique words inside the document.
INPUT:
Document format is using HTML-like format for storing articles. Here's
the format:
(contains an article)
> I had never used Perl before. Until someone showed me Perl is very fast
> for text processing (using its powerful regex), despite it's an
> interpreted language. It even beat Delphi and FPC though both are
> compiled language. A few lines Perl program almost two times faster than
> a few page
On Tuesday 30 October 2007 17:31, Inga Petuhhov wrote:
> A copy-paste from Python Shell:
> >>> a = 1
> >>> a
>
> 1
>
> >>> a = a + 0.4
> >>> a
>
> 1.3999
>
> >>> a = a - 0.4
> >>> a
>
> 0.99989
>
> >>> a == 1
>
> False
Or a bit more simple (and for some maybe even more surp
Bee schreef:
The pascal counter-part resulting almost twice slower. Though not as
simple as Perl, the pascal code is quite simple and only using standar
fpc's units. But, I won't post the code here to not influence your
logic. ;)
For me it would be better if you posted the pascal program, bec
Give us a test case (some example source code) and I will beat the living crap
out of any perl script. Perl is built using Cee, so anything Perl can do Cee can
do better.. which means Pascal can do better or similar. Perl is not written in
Perl. In other words, perl is just a wrapper around the Ce
> Hi all,
>
> I had never used Perl before. Until someone showed me Perl is very fast
> for text processing (using its powerful regex), despite it's an
> interpreted language. It even beat Delphi and FPC though both are
> compiled language. A few lines Perl program almost two times faster than
> a
Hi all,
I had never used Perl before. Until someone showed me Perl is very fast
for text processing (using its powerful regex), despite it's an
interpreted language. It even beat Delphi and FPC though both are
compiled language. A few lines Perl program almost two times faster than
a few page
> If the code is more efficient with a "goto", this is sufficient to
> justify its use.
Or if the code is clearer, for example to avoid deep nesting...
Or to make clean errors and debugging log files easier:
exit; .// default
//else
error1:
begin
debugln('error1');
exit;
end;
error2
begin
L a écrit :
P.S. Where i can read tips about writing fast FP code?
Also see some of the fastcode projects:
http://www.fastcode.dk/fastcodeproject/fastcodeproject/index.htm
And I'm sure you know you can always use GOTO statements when you really need
speed out of loops
:)
As a matter of fa
bartek a écrit :
On Tuesday 30 October 2007 22:07:21 Valdas Jankūnas wrote:
P.S. Where i can read tips about writing fast FP code?
FP is no Java. You get what you write. If you don't use virtual functions in
OO-code, there are no hidden performance killers.
First identify the bottleneck in yo
> I hear the Intel C compilers and Fortran compilers and Ada compilers are
better
> optimized for certain things since FPC/delphi are generally desinged for GUI
> programming. ;-)
>>
>> C/Fortran yes, Ada no; there exists no Intel Ada compiler. It is also
>> false that FPC is slow because it has be
Op Tue, 30 Oct 2007, schreef L:
> > I think first code is faster than second, because in first code
> > SubCalculate function is in calling function body?
>
> Actually some times local scope functions are slower because the variables
> need
> to be carried around since you are doing somewhat
> > P.S. Where i can read tips about writing fast FP code?
Also see some of the fastcode projects:
http://www.fastcode.dk/fastcodeproject/fastcodeproject/index.htm
And I'm sure you know you can always use GOTO statements when you really need
speed out of loops
:)
(not always, only if absolut
> I think first code is faster than second, because in first code
> SubCalculate function is in calling function body?
Actually some times local scope functions are slower because the variables need
to be carried around since you are doing somewhat of a lexical closure. The
local scope function
On Tuesday 30 October 2007 22:07:21 Valdas Jankūnas wrote:
> L rašė:
> > Here's one: profile your code!
>
> And where can you read how to do that?
> >
> > VALGRIND
>
> I processed my app trough "valgrind -v --tool=callgrind ./my_app",
> opened generated report with Kcachegrid and vi
> This package installs fine but fp IDE doesn't work. It still requires
> libtinfo.so.5 :( . Some students of my university likes Turbo Pascal
> then, I thinks that fp IDE would not scare them...
There was some similar bugreport from a SUSE user. We devised a fix, and he
afaik managed to build SUS
L rašė:
Here's one: profile your code!
And where can you read how to do that?
VALGRIND
I processed my app trough "valgrind -v --tool=callgrind ./my_app",
opened generated report with Kcachegrid and viewed how many times called
some procedures and etc.
Sorry for stupid question: i have n
Here's one: profile your code!
>>> And where can you read how to do that?
VALGRIND
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Mattias Gärtner rašė:
Zitat von Krishna <[EMAIL PROTECTED]>:
On 10/30/07, Mattias Gärtner <[EMAIL PROTECTED]> wrote:
Zitat von Krishna <[EMAIL PROTECTED]>:
On 10/30/07, Valdas Jankūnas <[EMAIL PROTECTED]> wrote:
P.S. Where i can read tips about writing fast FP code?
Here's one: profile
On 26 Oct 2007, at 16:58, Jonas Maebe wrote:
I will merge the fixes for the last two issues to FPC 2.2.1 some time
during the coming days and put up snapshot installers with that
version for PPC and i386 on the ftp site.
They are now uploaded and available at respectively (mind the line
wra
Hi Coco,
This package installs fine but fp IDE doesn't work. It still requires
libtinfo.so.5 :( . Some students of my university likes Turbo Pascal
then, I thinks that fp IDE would not scare them...
2007/10/28, Coco Pascal <[EMAIL PROTECTED]>:
> Paulo Estrela schreef:
> > Hi,
> >
> > I was trying
A copy-paste from Python Shell:
a = 1
a
1
a = a + 0.4
a
1.3999
a = a - 0.4
a
0.99989
a == 1
False
Best regards
Inga
PS I always talk to my informatics-students: You never-ever do with
real-variables something like this: if real1 = real2 then ...
Real numbers c
Zitat von Krishna <[EMAIL PROTECTED]>:
> On 10/30/07, Mattias Gärtner <[EMAIL PROTECTED]> wrote:
> > Zitat von Krishna <[EMAIL PROTECTED]>:
> >
> > > On 10/30/07, Valdas Jankūnas <[EMAIL PROTECTED]> wrote:
> > >
> > > > P.S. Where i can read tips about writing fast FP code?
> > > >
> > >
> > > H
On 10/30/07, Mattias Gärtner <[EMAIL PROTECTED]> wrote:
> Zitat von Krishna <[EMAIL PROTECTED]>:
>
> > On 10/30/07, Valdas Jankūnas <[EMAIL PROTECTED]> wrote:
> >
> > > P.S. Where i can read tips about writing fast FP code?
> > >
> >
> > Here's one: profile your code!
>
> And where can you read how
Zitat von Krishna <[EMAIL PROTECTED]>:
> On 10/30/07, Valdas Jankūnas <[EMAIL PROTECTED]> wrote:
>
> > P.S. Where i can read tips about writing fast FP code?
> >
>
> Here's one: profile your code!
And where can you read how to do that?
Mattias
___
fp
On 10/30/07, Valdas Jankūnas <[EMAIL PROTECTED]> wrote:
> P.S. Where i can read tips about writing fast FP code?
>
Here's one: profile your code!
Cheers,
-Krishna
--
One reason that life is complex is that it has a real part and an imaginary part
-Andrew Koenig
___
Now i write program, that program made extensive calculations. And i
want write fast code. Question about executing speed:
first code-
function Calculate1: Extended;
function SubCalculate: Extended;
begin
...
end;
begin
...
..:=SubCalculate;
...
end;
second code-
function
But someone tried to reproduce the example with other programming languages?
mm ha scritto:
Tom Verhoeff a écrit :
In fact, the GMP (GNU Multiple Precision Arithmetic Library
)
offers this and more. Unfortunately, there does not seem to be a
complete
FreePascal interface for it. Maybe it
Germán Pablo Gentile - PetroBox a écrit :
El mar, 30-10-2007 a las 02:28 +0100, mm escribió:
Joao Morais a écrit :
Daniël Mantione wrote:
And, as said before, no datastructure is adequate for storing a
mathematical real number. Not even if you have infinite memory.
Nope. If infinite memory was
El mar, 30-10-2007 a las 02:28 +0100, mm escribió:
> Joao Morais a écrit :
> > Daniël Mantione wrote:
> >> And, as said before, no datastructure is adequate for storing a
> >> mathematical real number. Not even if you have infinite memory.
> >
> > Nope. If infinite memory was tangible, you would
32 matches
Mail list logo