Re: [Scheme-reports] vector-insert Per Bothner (20 Aug 2014 21:41 UTC)
Re: [Scheme-reports] vector-insert Taylan Ulrich Bayirli/Kammer (21 Aug 2014 09:08 UTC)
Re: [Scheme-reports] vector-insert Per Bothner (21 Aug 2014 16:13 UTC)
Re: [Scheme-reports] vector-insert Kevin Wortman (21 Aug 2014 17:00 UTC)
Re: [Scheme-reports] vector-insert Sascha Ziemann (22 Aug 2014 08:00 UTC)
Re: [Scheme-reports] vector-insert Kevin Wortman (23 Aug 2014 00:57 UTC)
Re: [Scheme-reports] vector-insert Vassil Nikolov (23 Aug 2014 22:36 UTC)

Re: [Scheme-reports] vector-insert Vassil Nikolov 23 Aug 2014 22:28 UTC

On Fri, 22 Aug 2014 17:52:57 -0700, Kevin Wortman <kwortman@gmail.com> said:
> ...

> IMO, small constant-factor costs, like
> the time to initialize an array, are not
> a big concern in Scheme code. For
> reference, a quick test shows my 2 year
> old laptop can memset approx. 3.7
> GB/sec. So this cost is almost certainly
> dominated by other factors. In cases
> where this kind of thing makes a
> user-visible make-or-break difference,
> I'd probably need to be write assembly or
> low-level C anyway. So I prefer for
> Scheme code to do the Right Thing even at
> the expense of some small constant
> factors here and there. I would not go so
> far as to say there is broad consent to
> this position.

  I agree with the spirit of this
  statement.  Nevertheless, I can't resist
  making a pedantic note.  The rate given
  above, 3.7 GB/s, is on the order of
  1 word/ns; in other words, initializing a
  million-element vector would take on the
  order of a million CPU cycles.  This
  might be significant in the proverbial
  inner loop.  In other words, your CPUage
  will indeed vary...

  ---Vassil.

--
Vassil Nikolov | Васил Николов | <vnikolov@pobox.com>

"Be careful how you fix what you don't understand."  (Brooks 2010, 185)

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports