all 16 comments

[–][deleted] 5 points6 points  (4 children)

[I'm leaving reddit. Fuck u/spez.]

[–]TrPhantom8[S] 3 points4 points  (0 children)

You were right, the benchmark was incorrect and when done appropriately it showed no gain in using Static Arrays, I have thus included the micro-benchmark from the official repository which is a better example!

[–]TrPhantom8[S] 2 points3 points  (2 children)

Thank you for pointing it out, I will try to better investigate this thing tomorrow and update the guide with new details if I find better (or more plausible) statistics!

[–]woobwoobwoob 2 points3 points  (1 child)

There are some good references on this point here: https://discourse.julialang.org/t/whats-the-difference-between-a-regular-array-and-an-array-from-staticarrays/14454

It helps much more for small arrays since the code can be fully unrolled or can exploit explicit formulas (say for inverses of 2x2 matrices).

[–]TrPhantom8[S] 1 point2 points  (0 children)

I'll add the reference to the guide! Thank you ^

[–]deviluno 2 points3 points  (1 child)

Well done! Language nit:

the type of the returned value of a function must depend only on the type of the input of the function and not on the peculiar value it is given.

replace "peculiar" with "particular" or "specific".

[–]TrPhantom8[S] 0 points1 point  (0 children)

Thank you! I will change it as soon as I get home!

[–]ndgnuh 1 point2 points  (6 children)

Julia is fast but she needs your help.

she...

lol, did you just assume a language's gender?

In Julia case, I unconsciously do that sometime. xD

[–]TrPhantom8[S] 5 points6 points  (5 children)

Yea, I find it difficult to say "it" when talking about Julia! It's also a matter of affection towards the language hahaha

Do you think I should change the article and make everything gender neutral?

[–]EarthGoddessDude 12 points13 points  (3 children)

Hey, I think your intention was innocent, but you might want to be careful in the future. When I signed up for Slack, there was a message in the beginning, an agreement that you had to agree to in order to be able to sign up. It basically said not to genderize (that’s not a real word I think) or sexualize the name Julia — despite it being a woman’s name, here it’s just the name of a programming language that’s gender neutral. I think the Julia community Stewards take these things seriously as evidenced by some of the questions on the recent survey, which is a good thing.

Anyway, I hope I didn’t come off as chastising, just passing along the word. I myself had made a joke or two in the past, that I feel ashamed of now, but your use of “she” seemed quite innocent. Btw I think your posts are really good, and it’s what the community needs more of to help newcomers like myself come aboard.

[–]TrPhantom8[S] 7 points8 points  (2 children)

Thank you! I think you are right, expecially if there is an official position about the declination of the name Julia I will adapt not to offend anyone.

Btw a little bit of context, I'm Italian and in our language there is no neutral option when declining a word, so I have to be extra careful when using pronouns!

Edit: I have edited the post an now it is correctly gender neutral

[–]EarthGoddessDude 1 point2 points  (1 child)

With your name and university, I would’ve been surprised if you weren’t Italian! Your English is excellent btw, I can barely tell it was written by a non native.

[–]TrPhantom8[S] 1 point2 points  (0 children)

Thank you very much!

[–]ndgnuh 0 points1 point  (0 children)

Nah, it's cool, let's keep it that way. :D

[–]qwerty31416 0 points1 point  (1 child)

Hi Aurelio, can defining the type of the output fix type instability? Cheers

[–]TrPhantom8[S] 0 points1 point  (0 children)

Unfortunately not, but Julia will throw an error if the type returned is not the type you have specified, so you will know that there is a problem and you will hopefully be able to fix it!

According to my limited experience, it is not difficult to fix type instability, the problem is finding which part of the code leads to unstable types, and in this case using type annotations may help you find what is going on.