MathGroup Archive 1996

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

Search the Archive

Re: Re: Speed of dot product in Mathematica

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]]]


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

Allan Hayes
hay at

  • 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