Well one of the answer in the Cantu blog has this ( which I changed to
lets say a "real world" relative big function ) :
var arr: array... function Fuckup: boolean; var I: Integer; begin
<> 20 lines of code for var I := Low(arr) to High(arr) do if
arr[I]. then break; <> 20 lines
Hi!
I have a proposition for optimizing big case statements with sparse case
labels. Have you already thought of using a hash function to drastically
reduce the size of the jump table?
I have made some tests. For example, assume a case statement with 80
values for case labels in the range
Hi, after a lot of testing, I think it is safe and I have submitted this
patch to the bugtracker
https://bugs.freepascal.org/view.php?id=34873
With this patch, it is possible to provide a custom compare function to
a stringlist and thus allow the stringlist to keep the items
automatically
On Wed, 26 Dec 2018, Franz Müller wrote:
In the current implementation of TStringlist, there is a property
SortStyle, which is somewhat similar to the property Sorted. However,
it is different from sorted in that it allows 3 values: sslnone, which
corresponds to sorted=false, sslAuto, which
In the current implementation of TStringlist, there is a property
SortStyle, which is somewhat similar to the property Sorted. However, it
is different from sorted in that it allows 3 values: sslnone, which
corresponds to sorted=false, sslAuto, which corresponds to sorted=true,
and sslUser,
Am Sa., 22. Dez. 2018, 17:38 hat Bart <mailto:bartjun...@gmail.com>> geschrieben:
On Sat, Dec 22, 2018 at 1:03 PM Franz Müller mailto:b...@gmx.at>> wrote:
> But maybe there is an easy way to save the state of the random
number generator routine before sorting and
Just thought of it again.
If we make the quicksort procedure virtual protected instead of private,
it would be easy for anyone who needs it to derive a stringlist class in
which quicksort makes the pivot choice without using the random routine.
To avoid the performance penalty of the
Hi,
I have finished work on the improved stringlist. There are few changes
in the public section: A new public property OnCompareItems:
TStringListSortCompare allows to define the compare function, while
keeping sslAuto as sortstyle. If OnCompareItems uses data from the
object instead of or
@Tomas Hajny
Ah - thank you. Very strange. I did not expect and did not notice that
when I click on "reply to list", the reply uses another mail address
than the one the mail was sent to.
Looks like an error of the thunderbird mailprogramm, I think replies
should always use the same mail
Am 01.12.2018 um 09:09 schrieb fpc-devel-requ...@lists.freepascal.org:
That sounds as if you have an implementation ready ?
If so, please submit a patch to the bugtracker. I'll evaluate it and
if it
is indeed simple, as you claim, I will apply the patch.
Michael.
Havent programmed it yet,
Hi everybody!
Currently, the implementation of cutomsorted stringlists ist very far
from satisfactory; you have to call the sort routine again whenever a
string is added to the stringlist or an item is changed, because the
stringlist cannot keep itself automatically sorted using a custom
Hi everybody!
Currently, the implementation of cutomsorted stringlists ist very far
from satisfactory; you have to call the sort routine again whenever a
string is added to the stringlist or an item is changed, because the
stringlist cannot keep itself automatically sorted using a custom
12 matches
Mail list logo