Search found 238 matches

by Lost Zergling
Aug 12, 2019 18:48
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 3050

Re: StringArray Sort (case independent)

@MrSwiss : you are right. It was nevertheless a real challenge. 2x slower could have been an issue, 8x slower definitely a pitfall. The tool still retains some interest, but this allows to better measure the limits. When the length of the strings exceeds a certain threshold and there is no implicit ...
by Lost Zergling
Aug 12, 2019 17:40
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 3050

Re: StringArray Sort (case independent)

After accessing my computer again, .. My tests show that compared to the algorithm of Dodicat, Lzle is 8 to 9 times slower and especially that the need memory is much more important, in unacceptable proportions. I conclude that the list-based tool can not compete with an array in the proposed case, ...
by Lost Zergling
Aug 10, 2019 9:39
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 3050

Re: StringArray Sort (case independent)

Speed results can be very different on a random dataset depending on you fall in a slowdown case or not on the related algo (quicksort, bubble, and so on...). Speed can be also related to cache, processor, os... I can see at least 2 different approach : going on a fast algo and trying to reduce or l...
by Lost Zergling
Aug 06, 2019 20:20
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 3050

Re: StringArray Sort (case independent)

Considering JK explanations and extrapolating to lzle it is now obvious for me than the case independant feature should be handled into the hashtag (and not before it) in this context but I m not sure if it would be worth or not to add such feature to the tool (one more test and a small but global s...
by Lost Zergling
Aug 03, 2019 21:22
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 3050

Re: StringArray Sort (case independent)

2-3 sec with a len 10-20 on my side. Using len 60-90 could be 4 times slower or above. to be tested using different optimization options. whenever your solution is using disk cache or not, sounds interesting for optimization. I ll do a few tests also on a crypted disk. I ll do also some new tests on...
by Lost Zergling
Aug 03, 2019 0:32
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 3050

Re: StringArray Sort (case independent)

On my side : i5 2410m w64, battery mode. Lzle.bi (FB) : 2 sec / 3 sec depending on the dataset.
by Lost Zergling
Aug 02, 2019 17:12
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 3050

Re: StringArray Sort (case independent)

"more code, more trouble, less speed" In general, I'd say yes . But in the case of a sort, the problem is much more complex. Certainly, a code "bigger" will consume cache, but if the object of this code is precisely to limit cache consumption by the data, then this choice become...
by Lost Zergling
Aug 01, 2019 22:34
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 3050

Re: StringArray Sort (case independent)

I remain convinced of the relevance of lzle in this case (about 1000000 entries): it is a quasi standard feature of the tool. The reuse of the memory addresses makes the performances much less sensitive to the structure of the data to be sorted and the successive sorts and the tree is adapted to ave...
by Lost Zergling
Jul 29, 2019 13:15
Forum: General
Topic: Return pointer to an array from a function
Replies: 13
Views: 495

Re: Return pointer to an array from a function

Yes, instead of deleting outside, a redim inside a parallel scope (triggered by a parameter passed to the function) will indicate to the compiler the free space. It is difficult to imagine Dim doing the job just one way. lzae envisaged evolutions : support for indices on SetCursor(indice, (...) as i...
by Lost Zergling
Jul 29, 2019 11:03
Forum: General
Topic: Return pointer to an array from a function
Replies: 13
Views: 495

Re: Return pointer to an array from a function

Sounds like a "quirk" !-) #Include Once "D:\Basic\lzae_04.bi" Function returnPtr(ByRef aext As ArrayExtension, nB as Integer=2) as integer Static outarr() as double '= {10.1,20.2,30.3} Redim Preserve outarr(nB) outarr(0)=10.1 : outarr(1)=20.2 : outarr(2)+=30.3 : aSet(outarr() , a...
by Lost Zergling
Jul 28, 2019 15:28
Forum: General
Topic: Return pointer to an array from a function
Replies: 13
Views: 495

Re: Return pointer to an array from a function

Even though at the technical level in the Globals section, Static means "persistent" (it is rather a scope of duration than mapping). If the array is not copied, it ceases to exist at the end of the returnPtr function. Starting with the principle of creating the array in the function, usin...
by Lost Zergling
Jul 26, 2019 18:06
Forum: Tips and Tricks
Topic: StringArray Sort (case independent)
Replies: 87
Views: 3050

Re: StringArray Sort (case independent)

I would use my leaky lzle to fill a list using Lcase or Ucase for Tag0 (keys) and original keys as values or Tag1 ?...
by Lost Zergling
Jul 26, 2019 12:28
Forum: General
Topic: Return pointer to an array from a function
Replies: 13
Views: 495

Re: Return pointer to an array from a function

something like this : #Include Once "D:\Basic\lzae_04.bi" Function returnPtr(ByRef aext As ArrayExtension) as integer Static outarr(...) as double = {10.1,20.2,30.3} aSet(outarr() , aext) Return 1 End Function Dim i As Integer Dim aext As ArrayExtension returnPtr(aext) For i=1 to aext.NbSt...
by Lost Zergling
Jul 26, 2019 10:35
Forum: General
Topic: Return pointer to an array from a function
Replies: 13
Views: 495

Re: Return pointer to an array from a function

What really is an array in FB ? It could be summarized as two data structures and a hidden algorithm. The second structure contains all the elements of the array following each other and the first data structure (called the descriptor) contains technical access information (address of the first and ...
by Lost Zergling
Jul 23, 2019 22:07
Forum: Beginners
Topic: How to include arrays in type/class
Replies: 7
Views: 321

Re: How to include arrays in type/class

@fxm. Certes, certes. mais cela montre que quelqu'un est capable de faire des posts valant les miens :-)

Go to advanced search