# Should \`min.(1,f)\` be broadcasting as \`broadcast(x-\>min(1,x),f)\`?

**URL:** <https://discourse.julialang.org/t/should-min-1-f-be-broadcasting-as-broadcast-x-min-1-x-f/5554>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [August 25, 2017, 8:53am UTC](https://discourse.julialang.org/t/should-min-1-f-be-broadcasting-as-broadcast-x-min-1-x-f/5554 "2017-08-25T08:53:41Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [August 25, 2017, 12:23pm UTC](https://discourse.julialang.org/t/should-min-1-f-be-broadcasting-as-broadcast-x-min-1-x-f/5554/11 "2017-08-25T12:23:07Z")

</div>

> [@dlfivefifty](#):
>
> In my case, min.(1,f) will just not work, so the choice is either it sometimes work or it never works. I’d prefer sometimes works.

So don’t redefine `broadcast` as I mentioned?

> [@dlfivefifty](#):
>
> broadcast!(::typeof(\*), a::Number, b::Vector) = scale!(a,b)

I hope you mean Vector first, but

1. No it won’t be faster (if it is, it’s a performance bug).
2. If you are just defining optimization, it is perfectly valid and you are not supposed to be able to observe the difference.

> [@dlfivefifty](#):
>
> Julia is not a static compiled language.

The high performance part of julia [**is** a statically compiled language](https://discourse.julialang.org/t/notes-on-the-julia-compiler-jit-vs-static/4275/2).

> [@dlfivefifty](#):
>
> The REPL is real timing for a lot of people.

That’s exactly why we document and comment in all different places so that people don’t do this.

---

_[View the full topic](https://discourse.julialang.org/t/should-min-1-f-be-broadcasting-as-broadcast-x-min-1-x-f/5554)._
