Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!news2.euro.net!postnews2.euro.net!news.wanadoo.nl!not-for-mail From: mhx@iae.nl (Marcel Hendrix) Subject: Re: Function Points Newsgroups: comp.lang.forth Message-ID: <78671300948435@frunobulax.edu> Date: Mon, 3 Sep 2012 22:36:57 +0200 References: <5883549.frr9YTnbEn@sunwukong.fritz.box> X-Newsreader: iForth 2.0 console (October 21, 2006) Lines: 40 Organization: Wanadoo NNTP-Posting-Date: 03 Sep 2012 20:36:53 GMT NNTP-Posting-Host: s529d937f.adsl.wanadoo.nl X-Trace: 1346704613 dr1.euro.net 53063 82.157.147.127:49486 X-Complaints-To: abuse@wanadoo.nl Xref: csiph.com comp.lang.forth:15430 Bernd Paysan writes: Re: Function Points > Bernd Paysan wrote: >> I've written a binary heap now, it is considerably more code than the >> O(n) code. I'd like to make a few benchmarks, before I post >> comparisons. > Ok, here's the benchmarking stuff. > binary heap linear "heap" > 10 inserts 17,666ns 9,287ns > 10 deletes 15,941ns 6,960ns > 256 inserts 164,048ns 452,609ns > 256 deletes 476,276ns 251,134ns > 4096 inserts 2,609,171ns 93,231,767ns > 4096 deletes 12,061,005ns 55,881,857ns [..] Here are the iForth results (I had to remove the non-standard locals, rdrop, the timer and the [IFUNDEF]). I must say that I was pleasantly surprised that mini-oof.fs and string.fs worked immediately (after the fixes) :-) The trend is the same. binary heap linear "heap" -----------------------------------------+--------------------------- gForth iForth | gForth iForth -----------------------------------------+--------------------------- 10 inserts 17,666ns 14 us | 9,287ns 13 us 10 deletes 15,941ns 9 us | 6,960ns 6 us 256 inserts 164,048ns 55 us | 452,609ns 142 us 256 deletes 476,276ns 133 us | 251,134ns 99 us 4096 inserts 2,609,171ns 743 us | 93,231,767ns 15,493 us 4096 deletes 12,061,005ns 2,886 us | 55,881,857ns 7,712 us Note: different hardware. -marcel