1 Perflinty Lists
This section describes a list library that warns the user when
operations that are asymptotically fast on vectors are being called on
instances of a list more often than operations that are asymptotically
fast on lists.
, but not a
and constructs a separately profiled instance of a
Note that currently Racket lists
and Perflinty lists are incompatible.
list does not affect scores.
(list? ls?) → boolean?
| ls? : any/c|
, but only returns
is a Perflinty list?
list? does not affect scores.
map adds 1 to the list score.
car adds 1 to the list score.
cdr adds 1 to the list score.
cons adds 1 to the list score.
(list-ref pls pos) → any/c
| pls : list?|
| pos : exact-nonnegative-integer?|
list-ref adds 1 to the vector score.
length adds 1 to the vector score.