# ⁠inline vararg

**URL:** <https://discuss.kotlinlang.org/t/inline-vararg/13576>\
**Category:** Language Design\
**Created:** [July 22, 2019, 8:35am UTC](https://discuss.kotlinlang.org/t/inline-vararg/13576 "2019-07-22T08:35:30Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![fvasco](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/fvasco/32/1961_2.png) [@fvasco](https://discuss.kotlinlang.org/u/fvasco)\
**Post date:** [July 22, 2019, 9:48am UTC](https://discuss.kotlinlang.org/t/inline-vararg/13576/4 "2019-07-22T09:48:06Z")

</div>

> [@H4xX0r1337](#):
>
> I don’t know about the “good benchmark” yet.

Ok, don’t worry.

Write a good test is hard, on JVM it is really hard.  
I can read your test: “the first block is slower than last”, this is often true on JVM.

If you want to write a valuable test on JVM then you have to consider JMH.

See my comments here:

> [@Iterating through range created with until is faster than when the range is created with \`..\`](https://discuss.kotlinlang.org/t/iterating-through-range-created-with-until-is-faster-than-when-the-range-is-created-with/13424):
>
> Hello, I came across a strange issue, I ran the following two functions: fun test1() { var x = 1f var y = 0 for (a in 1 .. 1000) { for (b in 1 .. 1000) { for (c in 1 .. 1000) { x \*= -1f y += 1 } } } } and fun test1() { var x = 1f var y = 0 for (a in 1 until 1001) { for (b in 1 until 1001) { for (c in 1 until 1001) { …

> [@Proposal: Add opportunity to pass primitive type arguments in Inlined lambda "by reference"](https://discuss.kotlinlang.org/t/proposal-add-opportunity-to-pass-primitive-type-arguments-in-inlined-lambda-by-reference/13233):
>
> The passed argument can be a "reference " to primitive type value in outer scope, where lambda will inlined. so change this argument in lambda actually change the value in outer scope. att: @abreslav

---

_[View the full topic](https://discuss.kotlinlang.org/t/inline-vararg/13576)._
