The reason is that LinearSolve
by default parallelizes computations while other functions involved can use only one thread. So when you run almost pure LinearSolve
code it uses 4 threads and you get 50% processor load by MathKernel (because you have 8 virtual cores due to hyperthreading). When you run your "graphical" code MathKernel uses only one core and the actual processor load is 1/8 = 0.125. You can get significant speedup simply by replacing Table
with ParallelTable
:
Graphics[{Thickness[0.001],
ParallelTable[{Hue[Random[]], Line /@
Nest[Flatten[RandomSpike /@ #1, 1] & ,
startTriangle, 4]}, {48}]}] // Timing