Re: [racket-users] Racket BC versus CS unsafe flonums

2020-11-07 Thread Matthew Flatt
At Sat, 7 Nov 2020 16:42:43 +0100, Dominik Pantůček wrote: > My current understanding is that the best performance you get from > unsafe operations while using safe operations as hints for the flonum > unboxing algorithm, right? I'm not sure I understand what you mean, but I don't think unsafe

Re: [racket-users] Racket BC versus CS unsafe flonums

2020-11-07 Thread Dominik Pantůček
Wow, you are faster than I :) On 07. 11. 20 15:36, Matthew Flatt wrote: > At Fri, 6 Nov 2020 12:45:46 -0700, Matthew Flatt wrote: >> I will investigate faster option. A primitive without conversion could >> make the safe `flvector-set!` slightly faster, too, by avoiding a >> redundant check. > >

Re: [racket-users] Racket BC versus CS unsafe flonums

2020-11-07 Thread Matthew Flatt
At Fri, 6 Nov 2020 12:45:46 -0700, Matthew Flatt wrote: > I will investigate faster option. A primitive without conversion could > make the safe `flvector-set!` slightly faster, too, by avoiding a > redundant check. Long story short, I added flvectors to the Chez Scheme level as of v7.9.0.4. With

Re: [racket-users] Racket BC versus CS unsafe flonums

2020-11-06 Thread Matthew Flatt
At Fri, 6 Nov 2020 20:14:51 +0100, Dominik Pantůček wrote: > I assume that CS' unsafe-flvector-set! is actually pretty safe when it > comes to flonum-convertible numbers. It might be a bit faster because it > lacks the contract, but definitely it is not a "low level" variant. Hm, right --- it's

[racket-users] Racket BC versus CS unsafe flonums

2020-11-06 Thread Dominik Pantůček
Hello Racketeers, going through some more possible optimizations of my side projects, I encountered a different behavior of unsafe-flvector-set! between BC and CS implementations: CUT HERE #lang racket (require racket/unsafe/ops racket/flonum) (define flv (make-flvector 10))