[REBOL] Re: Ackermann (was Re: language shoot-out)
From: joel:neely:fedex at: 8-Nov-2002 10:36
Hello, all,
For the sake of complete-(er)-ness, I've rerun the same test on my
Sun E4500 account, with the following results:
>> ackermann/run
1 13 15 106
2 29 31 541
3 61 63 2432
4 125 127 10307
5 253 255 42438
Failure at depth 274 / 274 after 43341
Failure at depth 274 / 274 after 43272
Failure at depth 274 / 274 after 43207
1 13 15 106
2 29 31 541
3 61 63 2432
4 125 127 10307
5 253 255 42438
6 509 511 172233
Failure at depth 616 / 616 after 193963
Failure at depth 616 / 616 after 193554
1 13 15 106
2 29 31 541
3 61 63 2432
4 125 127 10307
5 253 255 42438
Failure at depth 379 / 379 after 72951
Failure at depth 379 / 379 after 71977
Failure at depth 379 / 379 after 71977
1 13 15 106
2 29 31 541
3 61 63 2432
4 125 127 10307
5 253 255 42438
Failure at depth 415 / 415 after 92622
Failure at depth 415 / 415 after 92622
Failure at depth 415 / 415 after 91993
1 13 15 106
2 29 31 541
3 61 63 2432
4 125 127 10307
5 253 255 42438
Failure at depth 478 / 478 after 140375
Failure at depth 477 / 478 after 139495
Failure at depth 478 / 478 after 138617
>> ackermann/stress
** Internal Error: Stack overflow
** Near: recur curr_depth: n + 1
>> ackermann/curr_depth
== 1277
The results from running this test on w2k, w95, OS X, and Solaris
leave me with the impression that the "stack" we're instrumenting
here may not be a data structure managed by the interpreter, but
rather an artifact of C implementation on a platform-specific
basis.
Someone with more inside info care to confirm or deny?
-jn-
Joel Neely wrote:
... [running on w2k and w95] ...
> >> ackermann/run
> 1 13 15 106
> 2 29 31 541
> 3 61 63 2432
> 4 125 127 10307
> 5 253 255 42438
> 6 509 511 172233
> Failure at depth 709 / 709 after 250361
> Failure at depth 708 / 708 after 248795
> 1 13 15 106
> 2 29 31 541
> 3 61 63 2432
> 4 125 127 10307
> 5 253 255 42438
> 6 509 511 172233
> 7 1021 1023 693964
> Failure at depth 1376 / 1376 after 942795
> 1 13 15 106
> 2 29 31 541
> 3 61 63 2432
> 4 125 127 10307
> 5 253 255 42438
> 6 509 511 172233
> Failure at depth 935 / 935 after 530602
> Failure at depth 936 / 936 after 528914
> 1 13 15 106
> 2 29 31 541
> 3 61 63 2432
> 4 125 127 10307
> 5 253 255 42438
> 6 509 511 172233
> Failure at depth 973 / 973 after 595945
> Failure at depth 972 / 972 after 594107
> 1 13 15 106
> 2 29 31 541
> 3 61 63 2432
> 4 125 127 10307
> 5 253 255 42438
> 6 509 511 172233
> 7 1021 1023 693964
> Failure at depth 1250 / 1251 after 797140
> >> do %ack.r
> >> ackermann/stress
> ** Internal Error: Stack overflow
> ** Near: recur curr_depth: n + 1
> >> ackermann/curr_depth
> == 3148
>
--
----------------------------------------------------------------------
Joel Neely joelDOTneelyATfedexDOTcom 901-263-4446