Search found 3419 matches

by idle
Wed Jun 09, 2021 3:07 am
Forum: Tricks 'n' Tips
Topic: Rounding to the next power of two
Replies: 5
Views: 287

Re: Rounding to the next power of two

Yes a nice tip if you need to call it frequently the assembly equivalent would be like this. Procedure RoundPowUP(Number) CompilerIf SizeOf(Integer) = 8 !mov rdx,[p.v_Number] !sub rdx, 1 !bsr qword rcx , rdx !add rcx,1 !shl rax,cl CompilerElse !mov edx,[p.v_Number] !sub edx, 1 !bsr qword ecx , edx !...
by idle
Mon Jun 07, 2021 10:10 am
Forum: Off Topic
Topic: We serve vegetarians
Replies: 18
Views: 850

Re: We serve vegetarians

the.weavster wrote: Mon Jun 07, 2021 7:37 am
idle wrote: Mon Jun 07, 2021 12:29 amSo I was at a local eatery and overheard this hipster guy asking the waiter "I'm vegan what do you recommend" and the waiter replied with "a Taxi"
Image
:lol: :lol: :lol:
by idle
Mon Jun 07, 2021 12:53 am
Forum: Off Topic
Topic: We serve vegetarians
Replies: 18
Views: 850

Re: We serve vegetarians

love it. :lol: I have no beef with vegetarian's or pescetarian's but vegans that's another matter. So I was at a local eatery and overheard this hipster guy asking the waiter "I'm vegan what do you recommend" and the waiter replied with "a Taxi" Oh dear, I'm vegan. :!: Shall I s...
by idle
Mon Jun 07, 2021 12:29 am
Forum: Off Topic
Topic: We serve vegetarians
Replies: 18
Views: 850

Re: We serve vegetarians

love it. :lol:
I have no beef with vegetarian's or pescetarian's but vegans that's another matter.
So I was at a local eatery and overheard this hipster guy asking the waiter "I'm vegan what do you recommend" and the waiter replied with "a Taxi"
by idle
Tue Jun 01, 2021 7:50 pm
Forum: Assembly Programming
Topic: A small procedure asm
Replies: 125
Views: 27846

Re: A small procedure asm

It would really help if you sent us your test code by PM. like your code for reading in the fasta format. It's not exactly collaboration otherwise and I just get the impression you want me to code you a kmer counter. :wink: by the way latest test of k=31 for 2,500,000 BP took 4 seconds but if you wa...
by idle
Mon May 31, 2021 2:08 am
Forum: Tricks 'n' Tips
Topic: BaseU_BF -Base64 replacement for Unicode environments - 35% smaller + AES + Compression - Modules
Replies: 3
Views: 766

Re: BaseU_BF -Base64 replacement for Unicode environments - 35% smaller - Module

Well done it's ~35% smaller than the Base64 of a Unicode string but bare in mind what's being encoded as it might be better to convert the string to UTF8 and then base64 that. CompilerIf #PB_Compiler_IsMainFile EnableExplicit Define len.i,ratio.f Define test$="Hello World, this is Saki's BaseU_...
by idle
Mon May 31, 2021 1:16 am
Forum: Feature Requests and Wishlists
Topic: Map with integer key
Replies: 18
Views: 2265

Re: Map with integer key

Squint technically hoses all over a Map, don't be fooled by the timings as they're not really a fair fight. A sized map, you know in advance how many items you need to store Items 1000000 Squint Numeric Set 794 ms Map Set 527 ms Squint numeric Get 399 ms Map Get 513 ms ========================= Squi...
by idle
Sun May 30, 2021 8:07 am
Forum: Feature Requests and Wishlists
Topic: Map with integer key
Replies: 18
Views: 2265

Re: Map with integer key

no but you can use the numeric functions of squint for that.
viewtopic.php?f=12&t=75783
by idle
Thu May 20, 2021 5:27 am
Forum: Assembly Programming
Topic: A small procedure asm
Replies: 125
Views: 27846

Re: A small procedure asm

I'm not sure yet if the results are all valid yet but for a test of 1,000,000 items it takes ~11 seconds. It excludes kmers which only appear once in the sequence and It includes the total counts of k and the individual counts of each repetition as well as thier positions in the sequence. It's runni...
by idle
Wed May 19, 2021 11:00 pm
Forum: Tricks 'n' Tips
Topic: StringField alternatives with list or array
Replies: 8
Views: 748

Re: StringField alternatives with list or array

@mk_soft Yes I think that's a better option. the only reason I did it by one was to clear the array and I've never been sure if you could guarantee that shrinking the array would keep the same address. If so it's cheap, if not its expensive. In your example the speed is from the array not being resi...
by idle
Wed May 19, 2021 9:49 am
Forum: Tricks 'n' Tips
Topic: StringField alternatives with list or array
Replies: 8
Views: 748

Re: StringField alternatives with list or array

@idle: You can further improve the Array version if you change the Redim to double (or 1.5) the size of the array everytime it gets too small instead of increase its size only by 1 per loop. See also here: https://cs.stackexchange.com/questions/9380/why-is-push-back-in-c-vectors-constant-amortized ...
by idle
Wed May 19, 2021 9:30 am
Forum: Assembly Programming
Topic: A small procedure asm
Replies: 125
Views: 27846

Re: A small procedure asm

Post in general discussions perhaps? It's a difficult task but can be easily tamed, though it will still take some time. Trading processing time for memory is more or less a necessity given that the problem has quadratic growth but then the additional time is insignificance to the time it would take...
by idle
Wed May 19, 2021 2:46 am
Forum: Tricks 'n' Tips
Topic: StringField - Alterable functions - Feasibility demos
Replies: 23
Views: 1420

Re: StringField - Alterable functions - Feasibility demos

still think you should fix up the code in this thread as your example doesn't work as expected

I've posted examples of StringField methods here
https://www.purebasic.fr/english/viewto ... 43#p570243
List=1759ms Array=2094ms PB=7633ms Len = 928 reps 10000
by idle
Wed May 19, 2021 2:42 am
Forum: Tricks 'n' Tips
Topic: StringField alternatives with list or array
Replies: 8
Views: 748

StringField alternatives with list or array

A comparison of utility StringField methods for when you just want to split strings a little quicker. added Stringfield BF to the tests Array=398ms List=525ms Next=657ms BF=1321ms PB=1909ms Len = 928 reps 10000 The longer the string the quicker the alternative methods will be compared to the native ...
by idle
Tue May 18, 2021 11:29 am
Forum: Tricks 'n' Tips
Topic: StringField - Alterable functions - Feasibility demos
Replies: 23
Views: 1420

Re: StringField - Alterable functions - Feasibility demos

Hi, I'm looking, I don't have more than 3ms here. Try converting a 3mb image into data lines with the Data Encoder. For me it takes about half a second and create about 50,000 lines. I'm talking about the 2nd code example in the 1st post of this topic that's supposed to be twice as fast, I copied i...