TidierOrg / Tidier.jl

Meta-package for data analysis in Julia, modeled after the R tidyverse.
MIT License
515 stars 14 forks source link

Implement `$` function prefix to prevent autovectorization #22

Closed kdpsingh closed 1 year ago

kdpsingh commented 1 year ago

Inspired by the @. macro, which includes a feature like this, I will add a $ prefix for functions that will prevent them from being auto-vectorized. For example, if you define a function called new_mean which calculates a mean, it would currently get auto-vectorized because it wouldn't get be picked by the current exclusion list.

After resolving this issue, referring to it as $new_mean in the code will prevent it from being vectorized.

kdpsingh commented 1 year ago

Instead of using $, which invokes Julia interpolation, we will use a ~ prefix to denote functions that should not be vectorized.