Re: Split in Mathematica 2.2/ $MaxRecursion crash
- To: mathgroup at smc.vnet.net
- Subject: [mg12979] Re: Split in Mathematica 2.2/ $MaxRecursion crash
- From: weber at math.uni-bonn.de (Matthias Weber)
- Date: Sun, 28 Jun 1998 02:52:03 -0400
- Organization: RHRZ - University of Bonn (Germany)
- References: <6msqgp$i7j$3@dragonfly.wolfram.com>
- Sender: owner-wri-mathgroup at wolfram.com
Hello I can confirm the slow behaviour of Split on a PowerMac 6100/66 (which has a 601 PPC, vm turned on) reported recently here, and the correct fast behaviour on an Irix. One of the proposed user-implemented alternatives however is even crashing my Mac: split2[li_,fQ_:SameQ]:=Module[{liLength,index,i},liLength=Length at li; index={};For[i=1,i<liLength,i++, If[Not@(fQ@@Part[li,{i,i+1}]),index={index,i}]]; (Head at li)@@((Take[li,#]&)/@( Transpose[{Flatten[{1,#+1}],Flatten[{#,liLength}]}]&)@index)]; This being highly recursive, to execute (say) w = Table[Random[Integer], {10000}]; split2[w];//Timing I need to increase $RecursionLimit=10000; This works on our Irix but crashes my poor little Mac (Bus error..., restart required) after one error message $RecursionLimit::"reclim": with a lower $RecursionLimit, I either get the usual bunch of error messages or just one of them, and the Mac crashes. Enjoy. Matthias Weber
- Follow-Ups:
- Re: Re: Split in Mathematica 2.2/ $MaxRecursion crash
- From: Daniel Lichtblau <danl>
- Re: Re: Split in Mathematica 2.2/ $MaxRecursion crash