Skip to content

^ is slow #2741

Closed
Closed

Description

This is my second day using Julia and I'm getting increasingly excited!

However, I nearly didn't make it even this far, as my early test programs had awful performance, and I nearly gave up with the common statement "beautiful language but the performance sucks". This was after carefully reading the documentation, especially the performance tips section.

Luckily, I happened across this discussion:
https://groups.google.com/d/topic/julia-dev/_UZ2A_Jp8Jc/discussion
and after changing one line of code from using A.^3, where A is a large two dimensional array, to using a nested for loop, I got performance faster than my C++ code (with an almost fair comparison).

I am merely suggesting here that a sentence is added to the performance tips section to note that currently, explicit loops can be much faster than array operations. Such a note would have saved me time, and prevented me from almost abandoning julia.

Thanks for making a truly beautiful (and fast) language,
John

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions