2 replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
source | link
Clear[g]
g[list_, limit_] := Module[{l, l2},
  l = (list - limit);
  l2 = Unitize[l] UnitStep[l] Range[Length[list]];
  Split[l2, #1 != 0 && #2 != 0 &] /. {0} -> Sequence[]];

g[x, 2]
(*{{3, 4}, {6, 7, 8, 9, 10}, {12, 13}}*)

Testing it with Leonid Shifrin Leonid Shifrin (with only one limit):

g[lrgTest, 250] // Length // AbsoluteTiming
(*{1.25263, 187504}*)
Clear[g]
g[list_, limit_] := Module[{l, l2},
  l = (list - limit);
  l2 = Unitize[l] UnitStep[l] Range[Length[list]];
  Split[l2, #1 != 0 && #2 != 0 &] /. {0} -> Sequence[]];

g[x, 2]
(*{{3, 4}, {6, 7, 8, 9, 10}, {12, 13}}*)

Testing it with Leonid Shifrin (with only one limit):

g[lrgTest, 250] // Length // AbsoluteTiming
(*{1.25263, 187504}*)
Clear[g]
g[list_, limit_] := Module[{l, l2},
  l = (list - limit);
  l2 = Unitize[l] UnitStep[l] Range[Length[list]];
  Split[l2, #1 != 0 && #2 != 0 &] /. {0} -> Sequence[]];

g[x, 2]
(*{{3, 4}, {6, 7, 8, 9, 10}, {12, 13}}*)

Testing it with Leonid Shifrin (with only one limit):

g[lrgTest, 250] // Length // AbsoluteTiming
(*{1.25263, 187504}*)
1
source | link

Clear[g]
g[list_, limit_] := Module[{l, l2},
  l = (list - limit);
  l2 = Unitize[l] UnitStep[l] Range[Length[list]];
  Split[l2, #1 != 0 && #2 != 0 &] /. {0} -> Sequence[]];

g[x, 2]
(*{{3, 4}, {6, 7, 8, 9, 10}, {12, 13}}*)

Testing it with Leonid Shifrin (with only one limit):

g[lrgTest, 250] // Length // AbsoluteTiming
(*{1.25263, 187504}*)