Ticket #1014 (closed enhancement: fixed)

Opened 23 months ago

Last modified 22 months ago

remove-if-not consing: seems to fully copy the original sequence before removing elements

Reported by: avodonosov Owned by:
Priority: normal Milestone:
Component: IDE Version: trunk
Keywords: remove-if-not consing Cc:

Description

(DEFPARAMETER *FILTERED-LIST* (REMOVE-IF-NOT (CONSTANTLY NIL) *LONG-LIST*))
took 75,108,000 microseconds (75.108000 seconds) to run.
     73,183,190 microseconds (73.183190 seconds, 97.44%) of which was spent in GC.
During that period, and with 8 available CPU cores,
     74,662,078 microseconds (74.662080 seconds) were spent in user mode
        171,601 microseconds ( 0.171601 seconds) were spent in system mode
 320,000,128 bytes of memory allocated.

(length *long-list*)
=> 20000000

(/ 320000128.0 (length *long-list*))
=> 16.000006
;; I.e. 16 bytes (64 bit cons) per element of original lisp

(asdf:implementation-identifier)
=> "ccl-1.8-f95-win-x64"

Probably the remove-if-not implementation could be enhanced.

Change History

comment:1 Changed 23 months ago by avodonosov

of original lisp

of original list

comment:2 Changed 22 months ago by gb

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in the trunk in r15477.

Note: See TracTickets for help on using tickets.