Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Speed of dot product in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5403] Re: [mg5350] Re: [mg5230] Speed of dot product in Mathematica
  • From: Allan Hayes <hay at haystack.demon.co.uk>
  • Date: Thu, 5 Dec 1996 14:50:36 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Twice as fast and simpler than my previous posting is the following  
variant of Michael Trott's code  -  using Range instead of Table.

SteppedTake2[list_, {start_, finish_, step_}]:=
list[[Range[start,finish, step]]]

Timings

SteppedTake[list, {20,9000,5}];//Timing (*my previous*)
SteppedTake2[list, {20,9000,5}];//Timing

Allan Hayes
hay at haystack.demon.co.uk
http://www.haystack.demon.co.uk


  • Prev by Date: Re: Argument types
  • Next by Date: HP version of Mathreader
  • Previous by thread: Re: A Bug in Parametric Plot ?
  • Next by thread: HP version of Mathreader