chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Significant overhead to simple-macros?


From: Raffael Cavallaro
Subject: [Chicken-users] Significant overhead to simple-macros?
Date: Thu, 6 Oct 2005 08:40:32 -0400

Having now understood the docs on importing symbols at the toplevel (I hope!) I've noticed that running the exact same program with simple-macros present represents a factor of 2 slowdown:

(BTW, fib-iter here is just a compiled scheme extension that computes the nth fibonacci number iteratively)

rafg5:~ raffaelc$ csi
  _______   _     __
/ ___/ /  (_)___/ /_____ ___
/ /__/ _ \/ / __/  '_/ -_) _ \
\___/_//_/_/\__/_/\_\\__/_//_/

Version 2, Build 2 - macosx-unix-gnu-ppc - [ dload ]
(c)2000-2005 Felix L. Winkelmann
#;1> (use fib-iter)
; loading /usr/local/lib/chicken/fib-iter.so ...
; loading /usr/local/lib/chicken/numbers-base.so ...
#;2> (time (fib 100000))
   2.549 seconds elapsed
   1.689 seconds in (major) GC
  399844 mutations
       0 minor GCs
    2104 major GCs
259740693472217241661550340212759154148804853865176965847247707039525345 435112736862655567728367167447546375872230744321116383994738750910309656 973821883044930522876385313349213530267927895670105127657827163560807305 053220024323311438398651613782723812477745377833729991621463405005466986 039086275099663936640921189012527196017210506030035058689402855810367511 765825136837743868493641345733883436515877542537191241050033219599133006 220436303521375652542182399869084855637408017925176162939175496345855861 630076281991608110983652635299544069428420657104604490380564713634603300 052085227770755444679472370903097901901486043284681985796101595100185060 826491923458731339915013391993236310230186417253647713626647508013398243 123170343145296418179005118795731676683497990168201184990775668645684506 628739248560391404760519955006628882634587718941068037009187936500173301 171002831047394745625609144493282137485557386408057981302826664027035429 441210491999580313187680589918651342517595991152056315533770399694103551 827527491995980225750790203779810308992298499630449625581404551700025029 976432219346216536621084187674542829826139823447836658158804081900330738 293950008213200937471548513102722081730543226486694963098791471436292555 425262404399961532697987680751064681906879211829916796440917827186856170 291810221267926740136265049978496884368097525470013100457418640644829948 587255174474669565187912691699324456481767332225714931496776334584662383 033382023970243685947828764187578857291071013370030009422933359729277919 140921280490154597626279105705524815888405177941819290521676957660874881 556786012881835435429230739781015478570132843861272862017665395344499300 198006295389369855007232866513171811358866135374726845854325489811371766 051946169379168844253425947812631038895204795659438071530191125396484711 263890071336285691015514534233294412843572209962867461194209516610023097 407099655319005081586699114454426478828726428450172533204864831945789203 998489382363674561822037509734856684743388724904933703163382657176072977 88917989136673251906232471180372...
#;3> (exit)
rafg5:~ raffaelc$ csi
  _______   _     __
/ ___/ /  (_)___/ /_____ ___
/ /__/ _ \/ / __/  '_/ -_) _ \
\___/_//_/_/\__/_/\_\\__/_//_/

Version 2, Build 2 - macosx-unix-gnu-ppc - [ dload ]
(c)2000-2005 Felix L. Winkelmann
#;1> (use simple-macros)
; loading /usr/local/lib/chicken/simple-macros.so ...
#;2> (use fib-iter)
; loading /usr/local/lib/chicken/fib-iter.so ...
; loading /usr/local/lib/chicken/numbers-base.so ...
#;3> (import-primitives time fib)
#;4> (time (fib 100000))
   5.449 seconds elapsed
   4.476 seconds in (major) GC
  399844 mutations
       0 minor GCs
    2104 major GCs
259740693472217241661550340212759154148804853865176965847247707039525345 435112736862655567728367167447546375872230744321116383994738750910309656 973821883044930522876385313349213530267927895670105127657827163560807305 053220024323311438398651613782723812477745377833729991621463405005466986 039086275099663936640921189012527196017210506030035058689402855810367511 765825136837743868493641345733883436515877542537191241050033219599133006 220436303521375652542182399869084855637408017925176162939175496345855861 630076281991608110983652635299544069428420657104604490380564713634603300 052085227770755444679472370903097901901486043284681985796101595100185060 826491923458731339915013391993236310230186417253647713626647508013398243 123170343145296418179005118795731676683497990168201184990775668645684506 628739248560391404760519955006628882634587718941068037009187936500173301 171002831047394745625609144493282137485557386408057981302826664027035429 441210491999580313187680589918651342517595991152056315533770399694103551 827527491995980225750790203779810308992298499630449625581404551700025029 976432219346216536621084187674542829826139823447836658158804081900330738 293950008213200937471548513102722081730543226486694963098791471436292555 425262404399961532697987680751064681906879211829916796440917827186856170 291810221267926740136265049978496884368097525470013100457418640644829948 587255174474669565187912691699324456481767332225714931496776334584662383 033382023970243685947828764187578857291071013370030009422933359729277919 140921280490154597626279105705524815888405177941819290521676957660874881 556786012881835435429230739781015478570132843861272862017665395344499300 198006295389369855007232866513171811358866135374726845854325489811371766 051946169379168844253425947812631038895204795659438071530191125396484711 263890071336285691015514534233294412843572209962867461194209516610023097 407099655319005081586699114454426478828726428450172533204864831945789203 998489382363674561822037509734856684743388724904933703163382657176072977 88917989136673251906232471180372...


These timings are consistent over a number of runs and for various n, and the run with simple-macros loaded always takes about twice as long.

regards


Raffael Cavallaro, Ph.D.
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]