Palli
January 9, 2017, 11:17am
1
A. Continuing the discussion from Does Julia ever do outlining? :
@giordano
Nothing prevents you from testing the condition
1 < -3 < 4
in this case there is no performance gain, on the contrary you’ll have performed one extra test.
In that case, with constants no, but in general, could be. See may race idea of (long) chaining of || (converted from [implicit] &&) at:
opened 09:04PM - 08 Jan 17 UTC
speculative
breaking
What @Ismael-VC wants with https://github.com/JuliaLang/julia/pull/19788 are str… ict aliases. There are other options, the problem may not be with his code though.*
If taken at face-value, left short-circuiting disallows running first the (or only) right-side:
```
if slow_function!(x) && fast_function!(y)
takes_a_long_time_getting_here
else
or_takes_a_long_time_getting_here
end
```
I have some ideas to fix that, they may be strictly implementations details, NOT incompatible with left short-circuiting, but then you need lots of prove-work to show absence of "side-effects".
There are two options:
* Disallow calling functions with side-effects (braking change for && and || but not new operators).
* Ignoring side-effects!
if fun1!(x) and fun2!(x) # note x-es are repeated, not y as above
is even worse [maybe the other if can work despite the !s ]
If we announce `and` and `or` not promising too much, maybe reusing his code (mostly; changes would be elsewhere, and in NEWS.md), then his code could possibly work.
I want to allow running, either side, or both (as &), or even neither (yes, that's a possibility..). And running both sides at once in separate thread, possibly killing them half-way through.
* I'm unclear on:
`(define is-prec-comparison?
(augment-prec-with-infix prec-comparison 'in 'isa))
[..]
(put! prec-table 'in (get prec-table '== 0)) ; add `in` to the prec-table
(put! prec-table 'isa (get prec-table '== 0)) ; add `isa` to the prec-table`
B. @ihnorton You merged into the outlining (and closed it! EDIT: I see the “no” now…). I guess I was a little off-topic at the other thread you merged from. The outlining question wasn’t closed, so I guess you may have made a mistake on closing (who has the priv. to undo?)?
Didn’t you also merge into the wrong thread…?
ihnorton
Split this topic
January 9, 2017, 2:21pm
2
2 posts were merged into an existing topic: Does Julia ever do outlining?