Brian M Johnson

Results 13 comments of Brian M Johnson

Another place the compiler should be able to optimize away moves is for functions/methods that take their inputs as `inout`/`borrowed` vs `owned` (e.g. for in-place functional updates): [When the argument...

> Just FYI, Mojo is [likely going to offer](https://github.com/modularml/mojo/issues/1458) _explicit_ return value optimization, which will be useful in cases where you really, really want to make sure that a return...

> can't seem to push to nightly Can you elaborate on what exactly is preventing you from doing so? See this [comment](https://github.com/modularml/mojo/pull/2694#issuecomment-2129767689) for some suggestions on what to do.

Actually, it seems this has already been fixed in the `nightly` branch (by me 😅). See [commit 565586f](https://github.com/modularml/mojo/commit/565586fcda0b7b0db4a40efe593af28618bd6589#diff-013bed940feb94fa25ae4e5d30fb4b4fd45718daaf87a47d81043fc5181c618aL747)

The [second typo fix](https://github.com/modularml/mojo/pull/2512/files#diff-013bed940feb94fa25ae4e5d30fb4b4fd45718daaf87a47d81043fc5181c618aL823) has already been applied in the `nightly` branch by someone else; see [commit 2d015fb](https://github.com/modularml/mojo/commit/2d015fb549fc3c1efd4312abc749066aaf66ea9c#diff-013bed940feb94fa25ae4e5d30fb4b4fd45718daaf87a47d81043fc5181c618aL834). I suggest you quickly rebase your branch on top of `nightly` to...

The first fix has also been applied in #2818.

> ```mojo > contrained[value == 1 or value == 2]() > ``` I assume you mean `constrained`?

For motivating examples, I'm re-listing the PRs I mentioned on [Discord](https://discord.com/channels/1087530497313357884/1224434323193594059/1240983667111886898): 1. 2912 2. 2881 3. 2732 4. 2697 5. 2676 6. 2665 7. 2662 8. 2656 9. 2490 11....

For more motivating examples, here are all the PRs (and one issue) till now (which I could find) that suggested documentation fixes which were already applied in the `nightly` branch:...

Is the constraint on `size_out` the only one for `reduce_add` or does "The element type of the vector must be integer or FP." also apply?