* Musings on performance, 2.2 and GOOPS (found factor 30)
@ 2015-05-17 11:08 Jan Nieuwenhuizen
2015-05-23 8:14 ` Jan Nieuwenhuizen
0 siblings, 1 reply; 3+ messages in thread
From: Jan Nieuwenhuizen @ 2015-05-17 11:08 UTC (permalink / raw)
To: guile-devel; +Cc: Rutger van Beusekom
Hi
I have an application of about 10.000 LOC using Guile/GOOPS with
performance problems. I found a way (thanks Ludo!) to run it with
and without GOOPS, and gained a factor of 30 in performance. See
details below.
TL;DR
1) do not use multiple dispatch/define-method: factor 2
2) use plain lists (interface name (types ...) ...) instead of
(define-class <interface> (types ...) ...): factor 5 (another factor 3)
3) use guile-2.2 instead of guile-2.0.11: factor 30 (another factor 5)
Amazing work!! (even faster than V8/nodejs)
Although 3) just upgrading guile and gain a factor of 5 sounds very
nice, it wasn't so easy for me to collect that factor 5.
Using guile-2.2 with GOOPS still in place does not help much (bit
slower when using multiple dispatch/define-method, bit faster whithout
multiple dispatch). So, I had to do 1) and 2) to find and collect 3).
I am considering to use GOOPS for development and run without GOOPS in
production (if the extensive regression test still passes :-)
(Prototyping in Guile and) rewriting it in C++11 would easily give us
another factor 10/20... :-(
Suggestions much appreciated.
Greetings, Jan
The `gaiag' script runs the version with GOOPS, the `g' script uses
plain lists.
$ guile --version guile (GNU Guile) 2.0.11
$ guile-2.2 --version
guile (GNU Guile) 2.1.0.1098-5ded
Using define-method; multiple dispatch
$ time GUILE=guile ./gaiag -l resolve Handle.dzn >/dev/null
real 0m8.128s
user 0m8.100s
sys 0m0.004s
$ time GUILE=guile-2.2 ./gaiag -l resolve Handle.dzn >/dev/null
real 0m9.738s
user 0m9.784s
sys 0m0.048s
It seems that multiple dispatch is a bit slower on 2.2 ...
I rewrote all usage of define-method
(define-method (foo (o <top>) o))
(define-method (foo (o <interface>) (mangle o)))
using match
(define (foo o)
(match o
(<interface> (mangle o))
(_ o)))
and rerouted make from
(define-class <ast> ())
(define-class <named> (<ast>)
(name :accessor .name :init-value #f :init-keyword :name))
(define-class <model> (<named>))
(define-class <interface> (<model>)
(types :accessor .types :init-form (make <types>) :init-keyword :types)
(events :accessor .events :init-form (make <events>) :init-keyword :events)
(behaviour :accessor .behaviour :init-value #f :init-keyword :behaviour))
(make <interface> ...)
to the non-hygienic (thanks Ludo! ... hygiene-clue-bat appreciated)
(define-syntax make
(lambda (s)
(syntax-case s ()
((_ type args ...)
(with-syntax
((m (datum->syntax #'type (symbol-append 'make- (syntax->datum #'type))))) #'(m args ...))))))
(define (make-<interface> . args)
(let-keywords
args #f
((name #f)
(types (make <types>))
(events (make <events>))
(behaviour (make <behaviour>)))
(cons <interface> (list name types events behaviour))))
and
(define <interface> 'interface)
and used SED (ugh) to change
(match o
(($ <interface> name types) (bar types)))
into
(match o
(('interface name types _ ___) (bar types)))
I could use records instead of lists
+ no SED needed, nice and unchanged record matchers
($ <foo> first-element-only) match
('foo first-element-only) no match!
+ more type-safety?
- rewriting the tree is so much nicer with lists than records/goops
(match o
(('interface body ...) (bar interface))
((h t ...) (map foo o))
(_ (foo o)))
- printing is simply pretty-print
- much work, what's the performance impact?
- not used much by schemers?
$ time GUILE=guile ./gaiag -l resolve Handle.dzn >/dev/null
real 0m4.550s
user 0m4.536s
sys 0m0.012s
$ time GUILE=guile ./g -l resolve Handle.dzn >/dev/null
real 0m1.672s
user 0m1.660s
sys 0m0.004s
$ time GUILE=guile-2.2 ./gaiag -l resolve Handle.dzn >/dev/null
real 0m3.942s
user 0m4.048s
sys 0m0.008s
$ time GUILE=guile-2.2 ./g -l resolve Handle.dzn >/dev/null
real 0m0.313s
user 0m0.316s
sys 0m0.004s
scheme@(gaiag resolve)> ,profile (ast:resolve (read-ast "Handle.dzn"))
< (ast:resolve (read-ast "Handle.dzn"))
% cumulative self
time seconds seconds procedure
4.86 23.43 0.41 language/cps/dfg.scm:647:8:visit-term
3.24 2.40 0.27 srfi/srfi-1.scm:458:2:fold
2.43 1.72 0.20 language/cps/dfg.scm:603:6:cont-folder
2.23 13.28 0.19 language/cps/renumber.scm:111:2:visit
2.23 0.19 0.19 list?
2.02 1.15 0.17 language/cps.scm:571:5:cont-folder
2.02 1.05 0.17 language/cps/slot-allocation.scm:233:0:allocate-slots
2.02 0.17 0.17 language/cps/dfg.scm:789:0:lookup-cont
2.02 0.17 0.17 %after-gc-thunk
1.82 0.91 0.15 language/cps/types.scm:1100:0:infer-types*
1.82 0.19 0.15 language/cps/dfg.scm:670:8:visit-exp
1.42 0.12 0.12 language/cps/dfg.scm:820:0:find-call
1.21 26.01 0.10 language/cps/dfg.scm:603:6:term-folder
1.21 20.59 0.10 language/cps/renumber.scm:277:2:visit-cont
1.21 3.63 0.10 language/cps/dce.scm:137:4:visit-fun
1.21 1.52 0.10 language/cps/compile-bytecode.scm:93:0:compile-fun
1.21 0.47 0.10 language/cps/intmap.scm:338:2:intersect
1.21 0.14 0.10 language/cps/dce.scm:190:18:lp
1.21 0.12 0.10 language/cps/dfg.scm:639:8:visit-cont
1.21 0.10 0.10 procedure?
1.01 186.28 0.08 srfi/srfi-1.scm:590:5:map1
1.01 15.66 0.08 language/cps/dce.scm:305:7:visit-term
1.01 10.91 0.08 srfi/srfi-1.scm:634:2:for-each
1.01 0.24 0.08 language/cps/renumber.scm:309:2:visit-exp
0.81 24.14 0.07 language/cps/renumber.scm:298:2:visit-term
0.81 13.11 0.07 language/cps.scm:571:5:term-folder
0.81 5.88 0.07 language/cps/arities.scm:39:4:visit-term
0.81 5.49 0.07 language/cps/simplify.scm:124:4:visit-term
0.81 3.51 0.07 language/tree-il.scm:418:2:foldts
0.81 3.50 0.07 srfi/srfi-1.scm:687:0:filter-map
0.81 0.24 0.07 language/cps/intmap.scm:105:0:intmap-add
0.81 0.17 0.07 srfi/srfi-1.scm:586:2:map
0.81 0.14 0.07 set-source-properties!
0.81 0.12 0.07 hashq-ref
0.81 0.08 0.07 language/cps/intmap.scm:61:0:new-branch
0.81 0.08 0.07 ice-9/boot-9.scm:246:2:map
0.81 0.07 0.07 language/cps/closure-conversion.scm:246:20
0.81 0.07 0.07 ice-9/psyntax.scm:766:10:search
0.81 0.07 0.07 length
0.61 16.99 0.05 language/cps/renumber.scm:268:2:visit-conts
0.61 4.88 0.05 language/cps/renumber.scm:220:10:visit-term
0.61 0.25 0.05 language/cps/intmap.scm:106:2:adjoin
0.61 0.24 0.05 language/cps/renumber.scm:185:10:visit-cont
0.61 0.12 0.05 language/cps/intset.scm:179:2:remove
0.61 0.08 0.05 language/cps/intset.scm:240:2:visit-node
0.61 0.08 0.05 language/cps/dce.scm:54:0:compute-defs
0.61 0.08 0.05 language/cps/types.scm:1166:4:type-entry-saturating-union
0.61 0.07 0.05 language/cps/intset.scm:137:0:intset-add
0.61 0.07 0.05 language/cps/slot-allocation.scm:296:4:allocate!
0.61 0.05 0.05 length+
0.61 0.05 0.05 ice-9/vlist.scm:449:0:vhash-cons
0.61 0.05 0.05 max
0.40 11.15 0.03 language/cps/dce.scm:268:7:visit-cont*
0.40 6.94 0.03 language/cps/closure-conversion.scm:414:4:visit-cont
0.40 4.56 0.03 language/cps/simplify.scm:112:4:visit-cont
0.40 3.67 0.03 language/cps/reify-primitives.scm:114:2:visit-cont
0.40 3.19 0.03 language/cps/simplify.scm:166:4:visit-term
0.40 2.92 0.03 language/tree-il.scm:425:2:lp
0.40 2.82 0.03 language/cps/type-fold.scm:392:9:visit-cont
0.40 2.60 0.03 language/cps.scm:596:31:term-folder
0.40 2.40 0.03 language/cps.scm:610:2:term-folder
0.40 1.52 0.03 language/cps/dce.scm:122:30:term-folder
0.40 1.47 0.03 language/cps/renumber.scm:163:10:visit-term
0.40 1.44 0.03 language/cps/dfg.scm:606:0:compute-dfg
0.40 1.22 0.03 language/tree-il/compile-cps.scm:206:0:convert
0.40 0.37 0.03 language/cps/dfg.scm:439:0:compute-live-variables
0.40 0.34 0.03 language/cps/types.scm:1191:4:propagate-types!
0.40 0.32 0.03 language/cps/prune-top-level-scopes.scm:36:4:visit-cont
0.40 0.15 0.03 language/cps/dfg.scm:604:6:cont-folder
0.40 0.12 0.03 system/vm/linker.scm:322:0:add-symbols
0.40 0.12 0.03 language/cps/dfg.scm:604:6
0.40 0.10 0.03 srfi/srfi-1.scm:865:0:list-index
0.40 0.10 0.03 language/cps/renumber.scm:138:10:visit-cont
0.40 0.08 0.03 language/cps.scm:596:31:cont-folder
0.40 0.07 0.03 ice-9/boot-9.scm:351:0:or-map
0.40 0.05 0.03 hashq
0.40 0.05 0.03 language/cps/intset.scm:267:0:intset-union
0.40 0.03 0.03 language/cps/intmap.scm:175:0:intmap-ref
0.40 0.03 0.03 gensym
0.40 0.03 0.03 ice-9/psyntax.scm:2883:8:match*
0.40 0.03 0.03 language/cps/types.scm:241:0:type-entry<=?
0.40 0.03 0.03 source-properties
0.40 0.03 0.03 vector-move-left!
0.40 0.03 0.03 language/cps/dfg.scm:338:4:common-idom
0.40 0.03 0.03 language/cps.scm:615:0:visit-cont-successors
0.40 0.03 0.03 language/cps/intset.scm:114:0:make-intset/prune
0.40 0.03 0.03 make-struct
0.40 0.03 0.03 memq
0.40 0.03 0.03 force
0.40 0.03 0.03 null?
0.40 0.03 0.03 hashq-set!
0.20 34.34 0.02 ice-9/boot-9.scm:251:5:map1
0.20 23.78 0.02 module/gaiag/resolve.scm:152:0
0.20 8.14 0.02 oop/goops/dispatch.scm:204:4
0.20 7.74 0.02 module/gaiag/gom/ast.scm:68:0:ast->gom--
0.20 6.45 0.02 language/cps/renumber.scm:37:4:visit
0.20 6.25 0.02 language/cps/closure-conversion.scm:425:4:visit-term
0.20 5.19 0.02 language/cps/simplify.scm:223:4:visit-term
0.20 4.54 0.02 language/cps/simplify.scm:208:4:visit-cont
0.20 3.80 0.02 language/cps/reify-primitives.scm:125:2:visit-term
0.20 3.38 0.02 language/cps/arities.scm:182:4:visit-cont
0.20 2.65 0.02 language/tree-il/fix-letrec.scm:32:2:foldts
0.20 2.58 0.02 language/cps/simplify.scm:294:4:visit-term
0.20 2.53 0.02 language/cps/simplify.scm:304:6:visit-dom-conts*
0.20 2.33 0.02 language/cps/prune-top-level-scopes.scm:51:4:visit-term
0.20 1.47 0.02 oop/goops.scm:1613:0
0.20 1.32 0.02 language/cps/constructors.scm:33:2:visit-cont
0.20 0.52 0.02 language/cps/simplify.scm:48:4:visit-term
0.20 0.42 0.02 language/cps/simplify.scm:155:4:visit-cont
0.20 0.35 0.02 ice-9/psyntax.scm:1268:6:syntax-type
0.20 0.34 0.02 language/tree-il/debug.scm:39:2:visit
0.20 0.32 0.02 language/cps/intmap.scm:291:2:intersect-branches/fresh
0.20 0.32 0.02 language/cps/closure-conversion.scm:531:0:convert-closures
0.20 0.30 0.02 language/tree-il/compile-cps.scm:606:4:foldts
0.20 0.29 0.02 language/cps/intmap.scm:289:0:intmap-intersect
0.20 0.27 0.02 language/cps/arities.scm:35:0:fix-arities*
0.20 0.25 0.02 cdr
0.20 0.25 0.02 ice-9/psyntax.scm:2281:21:expand-let
0.20 0.24 0.02 language/cps.scm:610:2:cont-folder
0.20 0.15 0.02 language/cps/self-references.scm:57:2:visit-exp
0.20 0.12 0.02 language/cps/types.scm:459:0
0.20 0.12 0.02 language/cps/intmap.scm:63:0:clone-branch-and-set
0.20 0.10 0.02 language/cps/dfg.scm:831:0:find-expression
0.20 0.10 0.02 language/cps/intset.scm:178:0:intset-remove
0.20 0.10 0.02 language/tree-il.scm:418:2:fold-values
0.20 0.08 0.02 language/cps/dfg.scm:263:0:analyze-reverse-control-flow
0.20 0.08 0.02 ice-9/psyntax.scm:761:6:id-var-name
0.20 0.08 0.02 ice-9/psyntax.scm:1476:10:rebuild-macro-output
0.20 0.07 0.02 language/tree-il/analyze.scm:543:4
0.20 0.07 0.02 language/cps/dfg.scm:841:0:find-constant-value
0.20 0.07 0.02 language/cps/dfg.scm:332:0:compute-idoms
0.20 0.05 0.02 language/cps/dfg.scm:346:4:compute-idom
0.20 0.05 0.02 language/cps/intset.scm:92:0:clone-branch-and-set
0.20 0.05 0.02 language/tree-il/fix-letrec.scm:58:18
0.20 0.05 0.02 language/cps.scm:597:32
0.20 0.05 0.02 language/cps/types.scm:230:0:var-type-entry
0.20 0.05 0.02 language/tree-il/fix-letrec.scm:216:5
0.20 0.03 0.02 language/cps/slot-allocation.scm:230:0:dead-after-use?
0.20 0.03 0.02 ice-9/psyntax.scm:993:6:bound-id-member?
0.20 0.03 0.02 language/cps/dfg.scm:383:0:compute-dom-edges
0.20 0.03 0.02 language/cps/simplify.scm:239:4:visit-exp
0.20 0.03 0.02 language/cps/slot-allocation.scm:178:0:solve-parallel-move
0.20 0.03 0.02 system/vm/assembler.scm:1412:0:link-constants
0.20 0.03 0.02 oop/goops/dispatch.scm:118:0:compute-dispatch-procedure
0.20 0.03 0.02 car
0.20 0.02 0.02 language/cps/intset.scm:90:0:new-branch
0.20 0.02 0.02 macro?
0.20 0.02 0.02 bytevector-u64-set!
0.20 0.02 0.02 language/cps/compile-bytecode.scm:160:25
0.20 0.02 0.02 language/cps/slot-allocation.scm:115:0:find-first-zero
0.20 0.02 0.02 system/vm/linker.scm:436:20
0.20 0.02 0.02 language/cps/intset.scm:524:8:lp
0.20 0.02 0.02 ice-9/psyntax.scm:958:6:bound-id=?
0.20 0.02 0.02 assq-ref
0.20 0.02 0.02 anon #x7f8f710a28e4
0.20 0.02 0.02 language/tree-il/compile-cps.scm:585:23
0.20 0.02 0.02 min
0.20 0.02 0.02 srfi/srfi-1.scm:987:23
0.20 0.02 0.02 language/cps/dfg.scm:861:3
0.20 0.02 0.02 language/cps.scm:216:0:fresh-var
0.20 0.02 0.02 bitvector-set!
0.20 0.02 0.02 language/cps/dfg.scm:895:0:continuation-scope-contains?
0.20 0.02 0.02 language/cps/intmap.scm:68:0:branch-empty?
0.20 0.02 0.02 language/tree-il/primitives.scm:282:3
0.20 0.02 0.02 language/cps/intmap.scm:79:0:add-level
0.20 0.02 0.02 oop/goops/dispatch.scm:218:2:map-until
0.20 0.02 0.02 language/cps/intmap.scm:86:0:make-intmap/prune
0.20 0.02 0.02 language/tree-il/analyze.scm:543:4
0.20 0.02 0.02 symbol->keyword
0.20 0.02 0.02 language/cps/slot-allocation.scm:139:0:lookup-slot
0.20 0.02 0.02 language/cps/types.scm:266:0:adjoin-var
0.20 0.02 0.02 reverse
0.20 0.02 0.02 bitvector-ref
0.20 0.02 0.02 ice-9/psyntax.scm:2462:19
0.20 0.02 0.02 ice-9/vlist.scm:254:0:vlist-fold
0.20 0.02 0.02 system/vm/linker.scm:206:0:segment-kind
0.20 0.02 0.02 language/cps/dfg.scm:814:0:find-defining-term
0.20 0.02 0.02 language/cps/type-fold.scm:285:22:term-folder
0.20 0.02 0.02 language/cps/dfg.scm:428:0:dfa-var-sym
0.20 0.02 0.02 system/vm/linker.scm:176:0:string-table-intern!
0.20 0.02 0.02 language/tree-il/compile-cps.scm:226:2:convert-args
0.20 0.02 0.02 ice-9/psyntax.scm:567:6:extend-var-env
0.20 0.02 0.02 logbit?
0.20 0.02 0.02 language/cps/intmap.scm:212:2:union-branches/fresh
0.20 0.02 0.02 language/cps/slot-allocation.scm:358:31
0.20 0.02 0.02 system/vm/linker.scm:218:0:count-segments
0.20 0.02 0.02 language/cps/dfg.scm:798:0:lookup-successors
0.20 0.02 0.02 system/vm/linker.scm:165:0:make-string-table
0.20 0.02 0.02 read
0.20 0.02 0.02 system/vm/elf.scm:596:0:make-elf-section*
0.20 0.02 0.02 make-bitvector
0.20 0.02 0.02 anon #x7f8f71098224
0.20 0.02 0.02 language/cps/type-fold.scm:79:0
0.20 0.02 0.02 language/cps/simplify.scm:202:4:subst
0.20 0.02 0.02 language/cps/dce.scm:113:4:mark-live!
0.20 0.02 0.02 not
0.20 0.02 0.02 language/cps/closure-conversion.scm:116:4:visit-exp
0.20 0.02 0.02 language/tree-il/debug.scm:34:2:add-env
0.20 0.02 0.02 language/tree-il.scm:563:18
0.20 0.02 0.02 language/cps/intset.scm:97:0:branch-empty?
0.20 0.02 0.02 exact-integer?
0.00 36.33 0.00 module/gaiag/resolve.scm:117:0
0.00 11.22 0.00 ice-9/boot-9.scm:284:2:for-each
0.00 10.17 0.00 module/gaiag/gom/map.scm:42:0
0.00 10.17 0.00 module/gaiag/gom/map.scm:30:0
0.00 9.78 0.00 module/gaiag/resolve.scm:431:7:loop
0.00 8.95 0.00 module/gaiag/gom/ast.scm:65:0:ast->gom-
0.00 8.78 0.00 concatenate
0.00 8.09 0.00 system/base/target.scm:51:0:with-target
0.00 8.09 0.00 system/base/compile.scm:237:0:compile
0.00 8.09 0.00 oop/goops/dispatch.scm:185:6
0.00 8.07 0.00 system/base/compile.scm:177:0:compile-fold
0.00 7.45 0.00 anon #x7f8f710a28c4
0.00 7.43 0.00 language/cps/reify-primitives.scm:75:11
0.00 7.26 0.00 language/cps/compile-bytecode.scm:489:0:compile-bytecode
0.00 7.09 0.00 module/gaiag/resolve.scm:59:0
0.00 6.18 0.00 module/gaiag/gom/map.scm:56:0
0.00 4.16 0.00 language/cps/compile-bytecode.scm:58:0:optimize
0.00 3.34 0.00 language/cps/dfg.scm:604:6:term-folder
0.00 2.79 0.00 language/cps/self-references.scm:34:2:visit-cont
0.00 2.72 0.00 language/cps/type-fold.scm:400:9:visit-term
0.00 2.58 0.00 language/cps/simplify.scm:281:4:visit-cont
0.00 2.57 0.00 language/cps/self-references.scm:46:2:visit-term
0.00 2.38 0.00 module/gaiag/gom/map.scm:54:0
0.00 2.28 0.00 language/cps/dce.scm:356:0:eliminate-dead-code
0.00 2.15 0.00 language/cps/dfg.scm:695:8:visit-clause
0.00 1.84 0.00 language/cps/closure-conversion.scm:96:15
0.00 1.50 0.00 language/cps/dce.scm:108:0:compute-live-code
0.00 1.22 0.00 module/gaiag/gom/map.scm:90:0
0.00 1.20 0.00 language/cps/constructors.scm:44:2:visit-term
0.00 1.15 0.00 language/cps/renumber.scm:346:0:renumber
0.00 1.13 0.00 language/cps/simplify.scm:332:0:simplify
0.00 0.91 0.00 language/cps/types.scm:1358:0:infer-types
0.00 0.78 0.00 ice-9/psyntax.scm:1559:10:parse
0.00 0.76 0.00 language/cps/dce.scm:82:0:elide-type-checks!
0.00 0.74 0.00 language/cps/dce.scm:261:2:visit-fun
0.00 0.74 0.00 language/cps/renumber.scm:334:2:visit-fun
0.00 0.73 0.00 language/tree-il/compile-cps.scm:132:7:fold-req
0.00 0.71 0.00 language/cps/renumber.scm:122:0:compute-new-labels-and-vars
0.00 0.68 0.00 language/cps/type-fold.scm:354:4:visit-term
0.00 0.66 0.00 language/cps/type-fold.scm:385:0:fold-constants*
0.00 0.54 0.00 ice-9/psyntax.scm:1889:35
0.00 0.51 0.00 find
0.00 0.49 0.00 module/gaiag/resolve.scm:509:0
0.00 0.49 0.00 language/cps/simplify.scm:200:0:beta-reduce
0.00 0.47 0.00 language/tree-il/compile-cps.scm:724:0:compile-cps
0.00 0.44 0.00 language/cps/renumber.scm:253:0:apply-renumbering
0.00 0.44 0.00 language/cps/type-fold.scm:442:0:type-fold
0.00 0.44 0.00 language/cps/type-fold.scm:434:9:visit-fun
0.00 0.42 0.00 language/cps/renumber.scm:183:8:compute-names-in-fun
0.00 0.37 0.00 language/cps/simplify.scm:148:0:compute-beta-reductions
0.00 0.35 0.00 language/cps/prune-bailouts.scm:49:2:visit-cont
0.00 0.34 0.00 language/cps/prune-bailouts.scm:61:2:visit-term
0.00 0.34 0.00 ice-9/psyntax.scm:1042:6:expand-top-sequence
0.00 0.34 0.00 ice-9/boot-9.scm:2608:0:save-module-excursion
0.00 0.34 0.00 language/scheme/compile-tree-il.scm:29:3
0.00 0.32 0.00 language/cps/closure-conversion.scm:76:4:visit-cont
0.00 0.32 0.00 ice-9/boot-9.scm:1057:2
0.00 0.30 0.00 ice-9/psyntax.scm:2195:28:lp
0.00 0.30 0.00 language/cps/simplify.scm:142:4:visit-fun
0.00 0.29 0.00 ice-9/psyntax.scm:2234:24
0.00 0.27 0.00 language/cps/simplify.scm:272:4:visit-fun-cont
0.00 0.25 0.00 language/cps/reify-primitives.scm:75:11
0.00 0.25 0.00 append
0.00 0.24 0.00 language/cps/simplify.scm:259:4:visit-fun
0.00 0.24 0.00 language/cps/dfg.scm:450:4:fold
0.00 0.22 0.00 language/cps/simplify.scm:268:0:redominate
0.00 0.20 0.00 language/cps/closure-conversion.scm:239:4:convert-free-var
0.00 0.20 0.00 system/vm/linker.scm:673:0:link-elf
0.00 0.20 0.00 language/cps/arities.scm:196:0:fix-arities
0.00 0.20 0.00 language/cps/simplify.scm:70:0:eta-reduce
0.00 0.19 0.00 system/vm/linker.scm:602:0:allocate-elf
0.00 0.19 0.00 language/cps/type-fold.scm:272:0:fold-and-reduce
0.00 0.17 0.00 language/tree-il/compile-cps.scm:633:0:optimize-tree-il
0.00 0.17 0.00 language/tree-il/analyze.scm:532:0:analyze-tree
0.00 0.15 0.00 language/cps/dfg.scm:558:0:compute-label-and-var-ranges
0.00 0.15 0.00 language/cps/reify-primitives.scm:109:2:visit-clause
0.00 0.15 0.00 language/cps/reify-primitives.scm:169:0:reify-primitives
0.00 0.14 0.00 module/gaiag/gom/util.scm:388:0
0.00 0.14 0.00 language/cps/elide-values.scm:107:0:elide-values
0.00 0.14 0.00 language/cps/dfg.scm:604:6:clause-folder
0.00 0.14 0.00 system/vm/linker.scm:336:0:allocate-segment
0.00 0.12 0.00 language/tree-il/compile-cps.scm:266:7:convert-clauses
0.00 0.12 0.00 module/gaiag/gom/util.scm:325:0
0.00 0.12 0.00 language/cps/specialize-primcalls.scm:33:0:specialize-primcalls
0.00 0.12 0.00 language/cps.scm:568:0:compute-max-label-and-var
0.00 0.12 0.00 language/cps/reify-primitives.scm:108:0:reify-primitives/1
0.00 0.12 0.00 language/tree-il/compile-cps.scm:512:5:lp
0.00 0.12 0.00 module/gaiag/resolve.scm:483:0
0.00 0.12 0.00 ice-9/psyntax.scm:871:4:resolve-identifier
0.00 0.10 0.00 language/cps.scm:596:31:clause-folder
0.00 0.10 0.00 language/cps/closure-conversion.scm:93:4:visit-term
0.00 0.08 0.00 module/gaiag/resolve.scm:182:2:type?
0.00 0.08 0.00 language/tree-il/compile-cps.scm:609:0:cps-convert/thunk
0.00 0.07 0.00 language/cps/dfg.scm:99:0:build-cont-table
0.00 0.07 0.00 language/cps/simplify.scm:287:4:visit-exp
0.00 0.07 0.00 system/vm/assembler.scm:2348:0:link-objects
0.00 0.07 0.00 language/tree-il/fix-letrec.scm:32:2:fold-values
0.00 0.07 0.00 language/tree-il/optimize.scm:30:0:optimize
0.00 0.07 0.00 language/tree-il/fix-letrec.scm:54:0:partition-vars
0.00 0.07 0.00 language/tree-il/fix-letrec.scm:213:0:fix-letrec
0.00 0.07 0.00 system/vm/assembler.scm:2379:0:link-assembly
0.00 0.05 0.00 module/gaiag/gom/util.scm:431:0
0.00 0.05 0.00 language/cps/renumber.scm:265:2:must-visit-cont
0.00 0.05 0.00 module/gaiag/gom/util.scm:346:0
0.00 0.05 0.00 language/cps/types.scm:1145:4:adjoin-vars
0.00 0.05 0.00 language/cps/closure-conversion.scm:45:0:analyze-closures
0.00 0.05 0.00 module/gaiag/gom/util.scm:363:0
0.00 0.05 0.00 language/cps/prune-top-level-scopes.scm:91:0:prune-top-level-scopes
0.00 0.05 0.00 language/cps/constructors.scm:103:0:inline-constructors
0.00 0.05 0.00 module/gaiag/gom/util.scm:328:0
0.00 0.05 0.00 language/cps/prune-top-level-scopes.scm:30:0:compute-referenced-scopes
0.00 0.05 0.00 language/cps/intset.scm:226:0:intset-next
0.00 0.05 0.00 language/cps/prune-bailouts.scm:48:0:prune-bailouts*
0.00 0.05 0.00 oop/goops/dispatch.scm:238:0:cache-miss
0.00 0.05 0.00 language/cps/simplify.scm:38:4:visit-cont
0.00 0.05 0.00 oop/goops/dispatch.scm:267:0:memoize-method!
0.00 0.05 0.00 module/gaiag/gom/util.scm:331:0
0.00 0.03 0.00 ice-9/psyntax.scm:1474:6:expand-macro
0.00 0.03 0.00 language/tree-il/compile-cps.scm:208:2:convert-arg
0.00 0.03 0.00 module/gaiag/resolve.scm:167:2:event-or-function?
0.00 0.03 0.00 module/gaiag/gom/util.scm:337:0
0.00 0.03 0.00 language/cps/prune-bailouts.scm:100:0:prune-bailouts
0.00 0.03 0.00 language/cps/contification.scm:404:0:contify
0.00 0.03 0.00 ice-9/psyntax.scm:2206:26
0.00 0.03 0.00 language/cps/dfg.scm:177:0:find-prompts
0.00 0.03 0.00 language/cps/types.scm:235:0:var-min
0.00 0.03 0.00 language/cps/slot-allocation.scm:613:16
0.00 0.03 0.00 language/cps/effects-analysis.scm:454:0:compute-effects
0.00 0.03 0.00 language/cps/prune-bailouts.scm:89:2:visit-fun
0.00 0.03 0.00 system/vm/assembler.scm:2024:0:link-debug
0.00 0.03 0.00 language/tree-il/compile-cps.scm:559:0:build-subst
0.00 0.03 0.00 ice-9/psyntax.scm:1363:12
0.00 0.03 0.00 ice-9/psyntax.scm:986:6:distinct-bound-ids?
0.00 0.03 0.00 language/cps/contification.scm:41:0:compute-contification
0.00 0.03 0.00 ice-9/psyntax.scm:1438:28
0.00 0.03 0.00 language/cps/slot-allocation.scm:284:4:recompute-live-slots
0.00 0.03 0.00 module/gaiag/resolve.scm:164:2:var?
0.00 0.03 0.00 language/cps/dce.scm:122:30:clause-folder
0.00 0.03 0.00 language/cps/dfg.scm:230:0:visit-prompt-control-flow
0.00 0.03 0.00 module/gaiag/gom/util.scm:385:0
0.00 0.03 0.00 language/cps/dfg.scm:201:0:find-prompt-bodies
0.00 0.03 0.00 ice-9/psyntax.scm:1725:8:check
0.00 0.03 0.00 system/vm/assembler.scm:1165:0:make-object
0.00 0.03 0.00 language/cps/slot-allocation.scm:326:4:parallel-move
0.00 0.03 0.00 language/cps/dce.scm:273:34
0.00 0.03 0.00 language/cps/constructors.scm:96:2:visit-fun
0.00 0.03 0.00 srfi/srfi-1.scm:947:0:lset-adjoin
0.00 0.03 0.00 system/vm/linker.scm:453:0:add-elf-objects
0.00 0.03 0.00 module/gaiag/gom/util.scm:395:8
0.00 0.02 0.00 language/cps/intmap.scm:210:0:intmap-union
0.00 0.02 0.00 module/gaiag/gom/util.scm:469:12
0.00 0.02 0.00 language/cps/dfg.scm:834:0:find-defining-expression
0.00 0.02 0.00 system/vm/linker.scm:581:0:record-special-segments
0.00 0.02 0.00 system/vm/linker.scm:443:10
0.00 0.02 0.00 module/gaiag/gom/util.scm:398:8
0.00 0.02 0.00 language/cps/type-fold.scm:285:22:clause-folder
0.00 0.02 0.00 %initialize-object
0.00 0.02 0.00 module/gaiag/gom/util.scm:461:12
0.00 0.02 0.00 module/gaiag/gom/util.scm:458:8
0.00 0.02 0.00 module/gaiag/gom/util.scm:467:0
0.00 0.02 0.00 ice-9/psyntax.scm:267:4
0.00 0.02 0.00 module/gaiag/gom/util.scm:411:0
0.00 0.02 0.00 module/gaiag/resolve.scm:126:0
0.00 0.02 0.00 system/vm/assembler.scm:1213:0:link-data
0.00 0.02 0.00 ice-9/psyntax.scm:1887:8:parse-body
0.00 0.02 0.00 <current input>:8:9
0.00 0.02 0.00 oop/goops/dispatch.scm:217:0:cache-dispatch
0.00 0.02 0.00 language/cps/types.scm:233:0:var-type
0.00 0.02 0.00 srfi/srfi-1.scm:835:0:any1
0.00 0.02 0.00 system/vm/elf.scm:819:0:string-table-ref
0.00 0.02 0.00 language/cps/type-fold.scm:346:4:visit-cont
0.00 0.02 0.00 ice-9/boot-9.scm:797:2:catch
0.00 0.02 0.00 system/vm/assembler.scm:413:0:make-assembler
0.00 0.02 0.00 language/cps/intset.scm:463:0:intset-subtract
0.00 0.02 0.00 language/cps/intset.scm:108:0:add-level
0.00 0.02 0.00 language/cps/simplify.scm:36:0:compute-eta-reductions
0.00 0.02 0.00 module/gaiag/gom/util.scm:299:0
0.00 0.02 0.00 language/cps/renumber.scm:35:0:sort-conts
0.00 0.02 0.00 ice-9/psyntax.scm:1438:28
0.00 0.02 0.00 oop/goops/dispatch.scm:65:0:emit-linear-dispatch
0.00 0.02 0.00 ice-9/psyntax.scm:1715:8:req
0.00 0.02 0.00 module/gaiag/reader.scm:76:0:read-ast
0.00 0.02 0.00 module/gaiag/gom/util.scm:443:0
---
Sample count: 494
Total time: 8.344575114 seconds (0.805487149 seconds in GC)
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Musings on performance, 2.2 and GOOPS (found factor 30)
2015-05-17 11:08 Musings on performance, 2.2 and GOOPS (found factor 30) Jan Nieuwenhuizen
@ 2015-05-23 8:14 ` Jan Nieuwenhuizen
2015-05-23 23:02 ` Christopher Allan Webber
0 siblings, 1 reply; 3+ messages in thread
From: Jan Nieuwenhuizen @ 2015-05-23 8:14 UTC (permalink / raw)
To: guile-devel
Jan Nieuwenhuizen writes:
> I have an application of about 10.000 LOC using Guile/GOOPS with
> performance problems. I found a way (thanks Ludo!) to run it with
> and without GOOPS, and gained a factor of 30 in performance. See
> details below.
I just found out about Andy's wip-goops-refactor branch. Using that
gives me almost the same benefit (only 15-20% slower), without any of
the modifications that I made over the past two weeks.
Greetings, Jan
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Musings on performance, 2.2 and GOOPS (found factor 30)
2015-05-23 8:14 ` Jan Nieuwenhuizen
@ 2015-05-23 23:02 ` Christopher Allan Webber
0 siblings, 0 replies; 3+ messages in thread
From: Christopher Allan Webber @ 2015-05-23 23:02 UTC (permalink / raw)
To: Jan Nieuwenhuizen; +Cc: guile-devel
Jan Nieuwenhuizen writes:
> Jan Nieuwenhuizen writes:
>
>> I have an application of about 10.000 LOC using Guile/GOOPS with
>> performance problems. I found a way (thanks Ludo!) to run it with
>> and without GOOPS, and gained a factor of 30 in performance. See
>> details below.
>
> I just found out about Andy's wip-goops-refactor branch. Using that
> gives me almost the same benefit (only 15-20% slower), without any of
> the modifications that I made over the past two weeks.
>
> Greetings, Jan
That's very cool to hear!
- Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-23 23:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-17 11:08 Musings on performance, 2.2 and GOOPS (found factor 30) Jan Nieuwenhuizen
2015-05-23 8:14 ` Jan Nieuwenhuizen
2015-05-23 23:02 ` Christopher Allan Webber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).