JuliaImages / JuliaImages/juliaimages.github.io

Don't spend your time on vectorizing your codes just to make things slower (CPU)

Open
#220 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

best practice
Dominant language
Julia
Stars
33
Forks
52
PR merge metrics
No merged PRs in 30d

Description

People in Python and Matlab communities enjoy "vectorizing my image processing pipeline and getting a big performance boost" story. The only reason for that is because for-loop is slow in Matlab/Python, and vectorizing the pipeline is indeed a tradeoff between "calling fast C/Fortran backend" and "overhead in intermediate memory allocation".

In Julia, unless you're writing GPU codes, use simple for-loop should be easier to write, and usually get you 2x-3x performance boost than vectorized codes.

And a lot of functions or helper utils (e.g., im2col/col2im #219) becomes useless in Julia because we don't need to twist our mind to vectorize the codes to get high performance.

Reference: https://julialang.org/blog/2017/01/moredots/

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the issue body and its reference to the Julia performance blog, then review the related im2col/col2im issue #219. The payload names no file, test, or concrete documentation change, so the desired content and completion criteria still need to be defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.