S
Srinivas Jonnalagadda
I was just looking at lazy.rb (http://moonbase.rydia.net/software/lazy/).
The example 'rjust_lines' on that page is very interesting for several
numerical computation scenarios, as well, where _not every_ computed
result is actually used. However, the computation could involve
multiplication of two vectors, and in the absence of any lazy
evaluation, the cost of entire set of computations would be incurred
right then!
I do not know Scheme, hence cannot perhaps appreciate just how routine
such programming could be, but expression templates technique in C++
was used to a similar effect in libraries such as Blitz++.
Very nice feature -- thank you!
Best regards,
JS
The example 'rjust_lines' on that page is very interesting for several
numerical computation scenarios, as well, where _not every_ computed
result is actually used. However, the computation could involve
multiplication of two vectors, and in the absence of any lazy
evaluation, the cost of entire set of computations would be incurred
right then!
I do not know Scheme, hence cannot perhaps appreciate just how routine
such programming could be, but expression templates technique in C++
was used to a similar effect in libraries such as Blitz++.
Very nice feature -- thank you!
Best regards,
JS