A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/JuliaLang/julia/issues/22858 below:

make indexing expressions participate in dot syntax fusion · Issue #22858 · JuliaLang/julia · GitHub

Consider an expression like v[p.(v)] .*= 2 where p is a predicate (i.e. returns a boolean). Currently Julia's semantics are that p.(v) is constructed and then used to index into v. However, the optimal implementation of this would to loop through v, testing each element x in v to see if p(x) is true and then multiplying it by 2 if that's the case. While it might be possible for a compiler to optimize the current semantics to this behavior in some circumstances, arguably, the dotted application of p in the indexing expression should participate in dot fusion of the whole expression, and this expression should simply mean the optimal implementation. Marking as 1.0 since if we're going to change the semantics of this expression, we should do so before then.

ararslan, malmaud, jekbradbury, ssfrr, tkoolen and 7 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4