From: Bruno D. <bru...@gm...> - 2007-11-22 09:23:27
|
Juho Snellman writes: > As for the slowness issue, since everybody seems to be making wild > guesses about the reasons without actually doing any profiling, I'll > throw in one more. Here's the result SBCL's statistical profiler shows on my 64 bit machine (The statistics are reproducible up to fluctuations of about 1%): (sb-sprof:with-profiling (:max-samples 10000 :report :flat :loop nil) (parse-text "/localdata/daniel/fake-data.txt")) Profiler sample vector full (2280 traces / 100000 samples), doubling the size 86735 Number of samples: 2999 Sample interval: 0.01 seconds Total sampling time: 29.99 seconds Number of cycles: 0 Self Total Cumul Nr Count % Count % Count % Calls Function ------------------------------------------------------------------------ 1 540 18.0 540 18.0 540 18.0 - (FLET #:CLEANUP-FUN-[CALL-WITHOUT-INTERRUPTS]24) 2 335 11.2 1424 47.5 875 29.2 - SB-IMPL::VECTOR-SUBSEQ* 3 329 11.0 501 16.7 1204 40.1 - READ-LINE 4 276 9.2 656 21.9 1480 49.3 - SB-KERNEL:%FIND-POSITION 5 189 6.3 189 6.3 1669 55.7 - SB-KERNEL:HAIRY-DATA-VECTOR-SET 6 186 6.2 186 6.2 1855 61.9 - SB-IMPL::OPTIMIZED-DATA-VECTOR-SET 7 176 5.9 176 5.9 2031 67.7 - SB-KERNEL:HAIRY-DATA-VECTOR-REF/CHECK-BOUNDS 8 166 5.5 166 5.5 2197 73.3 - SB-IMPL::OPTIMIZED-DATA-VECTOR-REF 9 150 5.0 150 5.0 2347 78.3 - EQL 10 106 3.5 137 4.6 2453 81.8 - SB-IMPL::FD-STREAM-READ-N-CHARACTERS/LATIN-1 11 93 3.1 93 3.1 2546 84.9 - SB-KERNEL:HAIRY-DATA-VECTOR-REF 12 87 2.9 87 2.9 2633 87.8 - SB-IMPL::OPTIMIZED-DATA-VECTOR-REF 13 83 2.8 97 3.2 2716 90.6 - MAKE-ARRAY 14 55 1.8 55 1.8 2771 92.4 - SB-VM::GENERIC-+ 15 52 1.7 52 1.7 2823 94.1 - IDENTITY 16 27 0.9 27 0.9 2850 95.0 - SB-KERNEL:%SHRINK-VECTOR 17 21 0.7 1427 47.6 2871 95.7 - SPLIT-SEQUENCE:SPLIT-SEQUENCE 18 12 0.4 21 0.7 2883 96.1 - SB-IMPL::GETHASH3 19 12 0.4 36 1.2 2895 96.5 - FIND 20 9 0.3 768 25.6 2904 96.8 - STRING-TRIM 21 8 0.3 656 21.9 2912 97.1 - POSITION 22 8 0.3 9 0.3 2920 97.4 - SUBSEQ 23 7 0.2 17 0.6 2927 97.6 - MAKE-HASH-TABLE 24 7 0.2 7 0.2 2934 97.8 - SB-KERNEL:UB32-BASH-COPY 25 7 0.2 7 0.2 2941 98.1 - TRUNCATE 26 6 0.2 6 0.2 2947 98.3 - SB-KERNEL:SEQUENCEP 27 6 0.2 7 0.2 2953 98.5 - CHAR= 28 4 0.1 2999 100.0 2957 98.6 - PARSE-TEXT 29 4 0.1 11 0.4 2961 98.7 - CEILING 30 4 0.1 9 0.3 2965 98.9 - SB-IMPL::%MAKE-HASH-TABLE 31 4 0.1 4 0.1 2969 99.0 - ARRAY-ELEMENT-TYPE 32 3 0.1 6 0.2 2972 99.1 - SB-IMPL::EQUAL-HASH 33 3 0.1 6 0.2 2975 99.2 - SB-KERNEL:%PUTHASH 34 3 0.1 3 0.1 2978 99.3 - NCONC 35 3 0.1 3 0.1 2981 99.4 - SB-IMPL::%VECTOR-WIDETAG-AND-N-BITS 36 2 0.1 2 0.1 2983 99.5 - SB-KERNEL:%SP-STRING-COMPARE 37 1 0.03 138 4.6 2984 99.5 - SB-INT:FAST-READ-CHAR-REFILL 38 1 0.03 2 0.1 2985 99.5 - SB-KERNEL:%SXHASH-SIMPLE-STRING 39 1 0.03 1 0.03 2986 99.6 - SB-IMPL::SYSREAD-MAY-BLOCK-P 40 1 0.03 1 0.03 2987 99.6 - (FLET SB-IMPL::TRICK) 41 1 0.03 3 0.1 2988 99.6 - SB-KERNEL:STRING=* 42 1 0.03 5 0.2 2989 99.7 - EQUAL 43 1 0.03 1 0.03 2990 99.7 - (LABELS SB-IMPL::EQUAL-AUX) 44 1 0.03 1 0.03 2991 99.7 - SB-KERNEL:%COERCE-CALLABLE-TO-FUN 45 1 0.03 1 0.03 2992 99.8 - (LABELS SB-IMPL::SXHASH-RECURSE) 46 1 0.03 1 0.03 2993 99.8 - LENGTH 47 1 0.03 1 0.03 2994 99.8 - SB-IMPL::CEIL-POWER-OF-TWO 48 0 0.0 2999 100.0 2994 99.8 - "Unknown component: #x1002A77190" 49 0 0.0 2999 100.0 2994 99.8 - EXECUTE-TEST 50 0 0.0 2999 100.0 2994 99.8 - TRY-IMPL 51 0 0.0 2999 100.0 2994 99.8 - SB-INT:SIMPLE-EVAL-IN-LEXENV 52 0 0.0 2999 100.0 2994 99.8 - "Unknown component: #x1004D06A60" 53 0 0.0 2999 100.0 2994 99.8 - (SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-SYNTAX-HOOKS (T)) 54 0 0.0 2999 100.0 2994 99.8 - SWANK::CALL-WITH-BUFFER-SYNTAX 55 0 0.0 2999 100.0 2994 99.8 - "Unknown component: #x10051954D0" 56 0 0.0 2999 100.0 2994 99.8 - (SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK (T T)) 57 0 0.0 2999 100.0 2994 99.8 - "Unknown component: #x1004E5D4A0" 58 0 0.0 2999 100.0 2994 99.8 - SWANK::CALL-WITH-REDIRECTED-IO 59 0 0.0 2999 100.0 2994 99.8 - SWANK::CALL-WITH-CONNECTION 60 0 0.0 2999 100.0 2994 99.8 - SWANK::HANDLE-REQUEST 61 0 0.0 2999 100.0 2994 99.8 - SWANK::PROCESS-AVAILABLE-INPUT 62 0 0.0 2999 100.0 2994 99.8 - (FLET SWANK::HANDLER) 63 0 0.0 2999 100.0 2994 99.8 - (LAMBDA (SWANK-BACKEND::_)) 64 0 0.0 2999 100.0 2994 99.8 - SB-IMPL::SUB-SERVE-EVENT 65 0 0.0 2999 100.0 2994 99.8 - SB-SYS:WAIT-UNTIL-FD-USABLE 66 0 0.0 2999 100.0 2994 99.8 - SB-IMPL::REFILL-INPUT-BUFFER 67 0 0.0 2999 100.0 2994 99.8 - SB-IMPL::INPUT-CHAR/LATIN-1 68 0 0.0 2999 100.0 2994 99.8 - READ-CHAR 69 0 0.0 2999 100.0 2994 99.8 - READ-PRESERVING-WHITESPACE 70 0 0.0 2999 100.0 2994 99.8 - READ 71 0 0.0 2999 100.0 2994 99.8 - SB-IMPL::REPL-READ-FORM-FUN 72 0 0.0 2999 100.0 2994 99.8 - SB-IMPL::REPL-FUN 73 0 0.0 2999 100.0 2994 99.8 - "Unknown component: #x1000081E20" 74 0 0.0 2999 100.0 2994 99.8 - (LAMBDA NIL) 75 0 0.0 2999 100.0 2994 99.8 - SB-IMPL::%WITH-REBOUND-IO-SYNTAX 76 0 0.0 2999 100.0 2994 99.8 - SB-IMPL::TOPLEVEL-REPL 77 0 0.0 2999 100.0 2994 99.8 - SB-IMPL::TOPLEVEL-INIT 78 0 0.0 2999 100.0 2994 99.8 - (LABELS SB-IMPL::RESTART-LISP) 79 0 0.0 540 18.0 2994 99.8 - SB-UNIX::CALL-WITHOUT-INTERRUPTS 80 0 0.0 511 17.0 2994 99.8 - SB-KERNEL:SUB-GC 81 0 0.0 26 0.9 2994 99.8 - SB-SYS:INVOKE-INTERRUPTION 82 0 0.0 26 0.9 2994 99.8 - (FLET SB-UNIX::RUN-HANDLER) 83 0 0.0 2 0.1 2994 99.8 - SB-THREAD::CALL-WITH-RECURSIVE-SYSTEM-SPINLOCK 84 0 0.0 1 0.03 2994 99.8 - SB-THREAD::CALL-WITH-SYSTEM-MUTEX 85 0 0.0 1 0.03 2994 99.8 - SB-KERNEL:RUN-PENDING-FINALIZERS ------------------------------------------------------------------------ 5 0.2 elsewhere Best regards Bruno Daniel |