Linear lazy-evaluation is now supported in ATS2. Here is an implementation
of Erathosthene’s sieve of primes based on linear lazy-evalutation:
Every piece of allocated memory is freed at the end in this implementation.
In terms of efficiency,
it takes less than 1/4 of the time taken by a corresponding implementation
based on non-linear lazy
evaluation to find the 10000th prime number.
Every piece of allocated memory is freed at the end in this
implementation. In terms of efficiency,
it takes less than 1/4 of the time taken by a corresponding implementation
based on non-linear lazy
evaluation to find the 10000th prime number.
Every piece of allocated memory is freed at the end in this
implementation. In terms of efficiency,
it takes less than 1/4 of the time taken by a corresponding
implementation based on non-linear lazy
evaluation to find the 10000th prime number.
Every piece of allocated memory is freed at the end in this
implementation. In terms of efficiency,
it takes less than 1/4 of the time taken by a corresponding
implementation based on non-linear lazy
evaluation to find the 10000th prime number.