Hi, Angel de Vicente <angel.vicente.garr...@gmail.com> writes: > Being used to nullify a pointer for this, I'm not sure how to best > proceed in Julia. Is there a better way to build recursive data > structures?
OK, so this was just a test example to go for something bigger, and by using the cleaner version with Nullable fields I implemented a basic code to perform a Barnes-Hut N-body simulation (https://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation) The good think is that it works OK, and development while being able to use the REPL accelerates coding so much (in comparison to compiled languages), but the bad news is that it is ~25x slower than my own Fortran version :-( (I have tried to make all functions type stable and I have followed the same algorithm as in the Fortran version). I haven't done any code profiling yet, so I don't know which parts of the code are so expensive, but I will try to investigate these days... Any pointers/help on how to best proceed to identify bottlenecks and how to get rid of them in Julia are most welcome. Thanks, -- Ángel de Vicente http://www.iac.es/galeria/angelv/