You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(*A microbenchmark stressing closure allocation, closure evaluation and integer arithmetic.
Copyright 2012 Google Inc.
Licensed under the Apache License, Version 2.0 (the ''License''); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0*)
) (
public bench = (
self fib: 25.
)
fib: x = (
| f |
f:: [:n | n < 2 ifTrue: [1] ifFalse: [(self fib: n - 1) + (self fib: n - 2)]].