Skip to main content
added 82 characters in body
Source Link
garej
  • 5k
  • 2
  • 20
  • 44

Edit With m = RandomInteger[9, {3, 6, 1}]

Just for completeness:

Catenate /@ m 

Just for diversity reasons

Apply[##&Apply[#&, m, {2}] Apply[Sequence, m, {-2}] Map[First, m, {2}] 

Using @Mr.Wizard code I seehave updated the benchmark.

enter image description here

@MichaelE2 also noticed in comments that Catenate /@ m is really goodnot compilable.

enter image description here

Edit With m = RandomInteger[9, {3, 6, 1}]

Just for completeness:

Catenate /@ m 

Just for diversity reasons

Apply[##&, m, {2}] Apply[Sequence, m, {-2}] 

Using @Mr.Wizard code I see that Catenate /@ m is really good.

enter image description here

Edit With m = RandomInteger[9, {3, 6, 1}]

Just for completeness:

Catenate /@ m 

Just for diversity reasons

Apply[#&, m, {2}] Apply[Sequence, m, {-2}] Map[First, m, {2}] 

Using @Mr.Wizard code I have updated the benchmark.

enter image description here

@MichaelE2 also noticed in comments that Catenate is not compilable.

added 96 characters in body
Source Link
garej
  • 5k
  • 2
  • 20
  • 44

Edit With m = RandomInteger[9, {3, 6, 1}]

Just for completeness:

Catenate /@ m 

Just for diversity reasons

Apply[##&, m, {2}] Apply[Sequence, m, {-2}] 

Using @Mr.Wizard code I see that Catenate /@ m is really good.

enter image description here

Edit With m = RandomInteger[9, {3, 6, 1}]

Just for completeness:

Catenate /@ m 

Just for diversity reasons

Apply[##&, m, {2}] Apply[Sequence, m, {-2}] 

Edit With m = RandomInteger[9, {3, 6, 1}]

Just for completeness:

Catenate /@ m 

Just for diversity reasons

Apply[##&, m, {2}] Apply[Sequence, m, {-2}] 

Using @Mr.Wizard code I see that Catenate /@ m is really good.

enter image description here

added 44 characters in body
Source Link
garej
  • 5k
  • 2
  • 20
  • 44

Edit With m = RandomInteger[9, {3, 6, 1}]

Just for diversity reasons, withcompleteness:

mat = RandomInteger[9, {3,Catenate 6,/@ 1}]m 
 

you may useJust for diversity reasons

Apply[SequenceApply[##&, matm, {2}] Apply[Sequence, matm, {-2}] 

Just for diversity reasons, with

mat = RandomInteger[9, {3, 6, 1}] 

you may use

Apply[Sequence, mat, {2}] Apply[Sequence, mat, {-2}] 

Edit With m = RandomInteger[9, {3, 6, 1}]

Just for completeness:

Catenate /@ m 
 

Just for diversity reasons

Apply[##&, m, {2}] Apply[Sequence, m, {-2}] 
deleted 87 characters in body
Source Link
garej
  • 5k
  • 2
  • 20
  • 44
Loading
Source Link
garej
  • 5k
  • 2
  • 20
  • 44
Loading