7.7
1 Perflinty Lists
Link to this section with
@secref["Perflinty_Lists" #:doc '(lib "perflinty/docs/perflinty.scrbl")]
Link to this section with
@secref["Perflinty_Lists" #:doc '(lib "perflinty/docs/perflinty.scrbl")]
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.
Like
list, but not a
procedure? and constructs a separately profiled instance of a
Perflinty
list.
Note that currently Racket lists
and Perflinty lists are incompatible.
list does not affect scores.
(list? ls?) → boolean?
|
ls? : any/c |
Like
list?, but only returns
#t when
ls 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.