MathGroup Archive 2007

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

Search the Archive

Re: Map vs. Table

  • To: mathgroup at
  • Subject: [mg75387] Re: Map vs. Table
  • From: dh <dh at>
  • Date: Sat, 28 Apr 2007 05:51:40 -0400 (EDT)
  • References: <f0sfrs$ncb$>

Hi Istvan,

here is a Map solution:

i=0; ({++i,#})&/@ data

However, I can not verify that this is much faster.

hope this helps, Daniel

zac wrote:

> Dear Group,


> consider a set of data (y values):


> data = Table[i*j, {i, 5}, {j, 10}]


> I want to label each Integer with an x value:


> label := Table[{i, #} & /@ data[[i]], {i, Length[data]}]


> I've understand that list creation is much faster with Map than with

> Table.

> Is there an effective way to convert the Table to Map in the label

> function (either with nested Map or to incorporate the Table function

> into the Map)?

> Would it be really faster for very large datasets than with Table?


> thanks


> Istvan Zachar



  • Prev by Date: Re: Map vs. Table
  • Next by Date: Re: Map vs. Table
  • Previous by thread: Re: Map vs. Table
  • Next by thread: Re: Map vs. Table