Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2014

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

Search the Archive

Re: For 2014?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132194] Re: For 2014?
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Mon, 13 Jan 2014 02:24:45 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

Use Range@9 instead of Range[9]

----- Ulrich Arndt <ulrich.arndt at data2knowledge.de> wrote:
> Yes, this is much faster - 5 times on my machine.
> Problem is that we get 141 chars even if we replace the re by b ;-).
> 
> But can someone explain the reason for the huge processing time difference?
> 
> Ulrich
> 
> 
> Am 07.01.2014 um 08:54 schrieb Costa Bravo:
> 
> > Ulrich Arndt wrote:
> >>
> >> 
> l=Range[9];r=StringJoin[Riffle[ToString/@l,#]]&/@Tuples[{"+","-","*","/",""},8];Grid[{#,Extract[r,Position[ToExpression/@r,#]]}&/@(l+2010)]
> >>
> >  faster
> >
> > 
> l=Range[9];re=ToExpression[r=StringJoin[Riffle[ToString/@l,#]]&/@Tuples[{"+","-","*","/",""},8]];Grid[{#,Extract[r,Position[re,#]]}&/@(l+2010)]
> >
> > --
> >  Costa
> >
> 
> 




  • Prev by Date: Re: Compact formulation of array of constraints
  • Next by Date: Re: Compact formulation of array of constraints
  • Previous by thread: Re: For 2014?
  • Next by thread: Running problem in DSolve