(The highest DOF case was omitted in Julia because my crappy 'n slow 5-minute mesh refiner hogged all the memory.) Some tricks to speed up the code:
- Devectorize, devectorize, devectorize, ... Write everything that you possibly can using loops. Even some simple matrix-vector-multiplications if you do them inside loops.
- Do not use too much array slicing or anonymous functions (or reduntant function calls) inside loops. This will slow things down since function calls seem to have some overhead.
- Preallocate arrays if possible. Otherwise use 1D arrays and push!-command.