Re: Transducers v0.3.0 - R7RS edition

2023-04-16 Thread Jeremy Steward

Hey Damian, I must have missed this message when I announced v0.3.0.

On 4/3/23 00:08, Damien Mattei wrote:

Hello,

does this transducers implementation add some significant speed to code
when using them? i ask the question because i used transducers with
Guile with very poor speed improvement compared to normal code.



This question is going to be difficult to answer in any meaningful way. 
For starters, I'll assume you're using SRFI 171 with Guile?


Relative to the SRFI-171 base implementation, I'm not sure that the 
transducers library I've written is ever going to be "faster" than a 
hand-written / hand-optimized loop. I assume this is what you mean by 
"normal code." I believe SRFI 42 can be significantly faster, but is 
considerably different in terms of both purpose and implementation.


Nevertheless, I think there's a problem with the way the question is 
posed. Some thoughts:


- "normal code" is ill-defined here, and I think it's counter-intuitive 
to think about libraries relative to code with zero abstractions in 
terms of performance alone, especially in Scheme. Generally speaking, 
I'd say that if you can get good performance with what code you have and 
you don't see a maintenance problem, then maybe an abstraction isn't 
necessary.


- Asking about SRFI-171 in Guile relative to transducers in CHICKEN 
seems like it has a bunch of problems on its own. CHICKEN can generally 
be faster than many Scheme implementations but there's a wide number of 
reasons that code on Guile may perform worse or better.


- You've provided no real indication of what you were doing. It would be 
difficult to say how transducers might help improve (or not improve) 
performance for some nebulous set of problems.


Anyways, this is not to lambast you for the question -- I'm sure it 
comes from a genuine place. I'd encourage you to try the library out and 
use CHICKEN's profiler (call your application with the argument "-:p" 
without quotes, see 
). 
It's often better to measure what you can and then make a decision from 
there.


I'd also encourage you to read the documentation for transducers if you 
haven't already - it should give you an idea of what is being done and 
what kind of performance to expect 
().

--
Jeremy Steward



Transducers v0.4.0 - Mappings

2023-04-16 Thread Jeremy Steward

Hello CHICKEN users,

I've just released Transducers v0.4.0. This adds support for using 
transducers with SRFI-146 mappings / hashmaps. See the CHANGELOG:




As always, let me know if you find any interesting uses for the library 
or have any requests for how to support your own datatypes with the 
library.


I think my next big focus will be away from this library for a bit, 
outside of maybe writing more documentation / tutorials.


Cheers,
--
Jeremy Steward