1 /*
   2  * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 package org.openjdk.bench.valhalla.arraytotal.copy;
  24 
  25 import org.openjdk.bench.valhalla.arraytotal.util.StatesQ64long;
  26 import org.openjdk.bench.valhalla.types.Int64;
  27 import org.openjdk.bench.valhalla.types.Q64long;
  28 import org.openjdk.jmh.annotations.Benchmark;
  29 import org.openjdk.jmh.annotations.CompilerControl;
  30 
  31 public class InlineCopy2 extends StatesQ64long {
  32 
  33 
  34     @Benchmark
  35     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
  36     public void Obj_to_Obj_as_Obj_to_Obj_copy(Obj_as_Obj s, Obj_as_Obj d) {
  37         int len = s.arr.length;
  38         Object[] dst = d.arr;
  39         for (int i = 0; i < len; i++) {
  40             dst[i] = s.arr[i];
  41         }
  42     }
  43 
  44     @Benchmark
  45     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
  46     public void Obj_to_Int_as_Obj_to_Obj_copy(Obj_as_Obj s, Int_as_Obj d) {
  47         int len = s.arr.length;
  48         Object[] dst = d.arr;
  49         for (int i = 0; i < len; i++) {
  50             dst[i] = s.arr[i];
  51         }
  52     }
  53 
  54     @Benchmark
  55     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
  56     public void Obj_to_Ref_as_Obj_to_Obj_copy(Obj_as_Obj s, Ref_as_Obj d) {
  57         int len = s.arr.length;
  58         Object[] dst = d.arr;
  59         for (int i = 0; i < len; i++) {
  60             dst[i] = s.arr[i];
  61         }
  62     }
  63 
  64     @Benchmark
  65     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
  66     public void Obj_to_Val_as_Obj_to_Obj_copy(Obj_as_Obj s, Val_as_Obj d) {
  67         int len = s.arr.length;
  68         Object[] dst = d.arr;
  69         for (int i = 0; i < len; i++) {
  70             dst[i] = s.arr[i];
  71         }
  72     }
  73 
  74     @Benchmark
  75     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
  76     public void Obj_to_Int_as_Obj_to_Int_copy(Obj_as_Obj s, Int_as_Int d) {
  77         int len = s.arr.length;
  78         Int64[] dst = d.arr;
  79         for (int i = 0; i < len; i++) {
  80             dst[i] = (Int64)s.arr[i];
  81         }
  82     }
  83 
  84     @Benchmark
  85     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
  86     public void Obj_to_Ref_as_Obj_to_Int_copy(Obj_as_Obj s, Ref_as_Int d) {
  87         int len = s.arr.length;
  88         Int64[] dst = d.arr;
  89         for (int i = 0; i < len; i++) {
  90             dst[i] = (Int64)s.arr[i];
  91         }
  92     }
  93 
  94     @Benchmark
  95     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
  96     public void Obj_to_Val_as_Obj_to_Int_copy(Obj_as_Obj s, Val_as_Int d) {
  97         int len = s.arr.length;
  98         Int64[] dst = d.arr;
  99         for (int i = 0; i < len; i++) {
 100             dst[i] = (Int64)s.arr[i];
 101         }
 102     }
 103 
 104     @Benchmark
 105     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 106     public void Obj_to_Ref_as_Obj_to_Ref_copy(Obj_as_Obj s, Ref_as_Ref d) {
 107         int len = s.arr.length;
 108         Q64long[] dst = d.arr;
 109         for (int i = 0; i < len; i++) {
 110             dst[i] = (Q64long)s.arr[i];
 111         }
 112     }
 113 
 114     @Benchmark
 115     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 116     public void Obj_to_Val_as_Obj_to_Ref_copy(Obj_as_Obj s, Val_as_Ref d) {
 117         int len = s.arr.length;
 118         Q64long[] dst = d.arr;
 119         for (int i = 0; i < len; i++) {
 120             dst[i] = (Q64long)s.arr[i];
 121         }
 122     }
 123 
 124     @Benchmark
 125     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 126     public void Obj_to_Val_as_Obj_to_Val_copy(Obj_as_Obj s, Val_as_Val d) {
 127         int len = s.arr.length;
 128         Q64long[] dst = d.arr;
 129         for (int i = 0; i < len; i++) {
 130             dst[i] = (Q64long)s.arr[i];
 131         }
 132     }
 133 
 134     @Benchmark
 135     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 136     public void Int_to_Obj_as_Obj_to_Obj_copy(Int_as_Obj s, Obj_as_Obj d) {
 137         int len = s.arr.length;
 138         Object[] dst = d.arr;
 139         for (int i = 0; i < len; i++) {
 140             dst[i] = s.arr[i];
 141         }
 142     }
 143 
 144     @Benchmark
 145     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 146     public void Int_to_Int_as_Obj_to_Obj_copy(Int_as_Obj s, Int_as_Obj d) {
 147         int len = s.arr.length;
 148         Object[] dst = d.arr;
 149         for (int i = 0; i < len; i++) {
 150             dst[i] = s.arr[i];
 151         }
 152     }
 153 
 154     @Benchmark
 155     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 156     public void Int_to_Ref_as_Obj_to_Obj_copy(Int_as_Obj s, Ref_as_Obj d) {
 157         int len = s.arr.length;
 158         Object[] dst = d.arr;
 159         for (int i = 0; i < len; i++) {
 160             dst[i] = s.arr[i];
 161         }
 162     }
 163 
 164     @Benchmark
 165     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 166     public void Int_to_Val_as_Obj_to_Obj_copy(Int_as_Obj s, Val_as_Obj d) {
 167         int len = s.arr.length;
 168         Object[] dst = d.arr;
 169         for (int i = 0; i < len; i++) {
 170             dst[i] = s.arr[i];
 171         }
 172     }
 173 
 174     @Benchmark
 175     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 176     public void Int_to_Int_as_Obj_to_Int_copy(Int_as_Obj s, Int_as_Int d) {
 177         int len = s.arr.length;
 178         Int64[] dst = d.arr;
 179         for (int i = 0; i < len; i++) {
 180             dst[i] = (Int64)s.arr[i];
 181         }
 182     }
 183 
 184     @Benchmark
 185     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 186     public void Int_to_Ref_as_Obj_to_Int_copy(Int_as_Obj s, Ref_as_Int d) {
 187         int len = s.arr.length;
 188         Int64[] dst = d.arr;
 189         for (int i = 0; i < len; i++) {
 190             dst[i] = (Int64)s.arr[i];
 191         }
 192     }
 193 
 194     @Benchmark
 195     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 196     public void Int_to_Val_as_Obj_to_Int_copy(Int_as_Obj s, Val_as_Int d) {
 197         int len = s.arr.length;
 198         Int64[] dst = d.arr;
 199         for (int i = 0; i < len; i++) {
 200             dst[i] = (Int64)s.arr[i];
 201         }
 202     }
 203 
 204     @Benchmark
 205     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 206     public void Int_to_Ref_as_Obj_to_Ref_copy(Int_as_Obj s, Ref_as_Ref d) {
 207         int len = s.arr.length;
 208         Q64long[] dst = d.arr;
 209         for (int i = 0; i < len; i++) {
 210             dst[i] = (Q64long)s.arr[i];
 211         }
 212     }
 213 
 214     @Benchmark
 215     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 216     public void Int_to_Val_as_Obj_to_Ref_copy(Int_as_Obj s, Val_as_Ref d) {
 217         int len = s.arr.length;
 218         Q64long[] dst = d.arr;
 219         for (int i = 0; i < len; i++) {
 220             dst[i] = (Q64long)s.arr[i];
 221         }
 222     }
 223 
 224     @Benchmark
 225     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 226     public void Int_to_Val_as_Obj_to_Val_copy(Int_as_Obj s, Val_as_Val d) {
 227         int len = s.arr.length;
 228         Q64long[] dst = d.arr;
 229         for (int i = 0; i < len; i++) {
 230             dst[i] = (Q64long)s.arr[i];
 231         }
 232     }
 233 
 234     @Benchmark
 235     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 236     public void Ref_to_Obj_as_Obj_to_Obj_copy(Ref_as_Obj s, Obj_as_Obj d) {
 237         int len = s.arr.length;
 238         Object[] dst = d.arr;
 239         for (int i = 0; i < len; i++) {
 240             dst[i] = s.arr[i];
 241         }
 242     }
 243 
 244     @Benchmark
 245     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 246     public void Ref_to_Int_as_Obj_to_Obj_copy(Ref_as_Obj s, Int_as_Obj d) {
 247         int len = s.arr.length;
 248         Object[] dst = d.arr;
 249         for (int i = 0; i < len; i++) {
 250             dst[i] = s.arr[i];
 251         }
 252     }
 253 
 254     @Benchmark
 255     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 256     public void Ref_to_Ref_as_Obj_to_Obj_copy(Ref_as_Obj s, Ref_as_Obj d) {
 257         int len = s.arr.length;
 258         Object[] dst = d.arr;
 259         for (int i = 0; i < len; i++) {
 260             dst[i] = s.arr[i];
 261         }
 262     }
 263 
 264     @Benchmark
 265     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 266     public void Ref_to_Val_as_Obj_to_Obj_copy(Ref_as_Obj s, Val_as_Obj d) {
 267         int len = s.arr.length;
 268         Object[] dst = d.arr;
 269         for (int i = 0; i < len; i++) {
 270             dst[i] = s.arr[i];
 271         }
 272     }
 273 
 274     @Benchmark
 275     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 276     public void Ref_to_Int_as_Obj_to_Int_copy(Ref_as_Obj s, Int_as_Int d) {
 277         int len = s.arr.length;
 278         Int64[] dst = d.arr;
 279         for (int i = 0; i < len; i++) {
 280             dst[i] = (Int64)s.arr[i];
 281         }
 282     }
 283 
 284     @Benchmark
 285     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 286     public void Ref_to_Ref_as_Obj_to_Int_copy(Ref_as_Obj s, Ref_as_Int d) {
 287         int len = s.arr.length;
 288         Int64[] dst = d.arr;
 289         for (int i = 0; i < len; i++) {
 290             dst[i] = (Int64)s.arr[i];
 291         }
 292     }
 293 
 294     @Benchmark
 295     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 296     public void Ref_to_Val_as_Obj_to_Int_copy(Ref_as_Obj s, Val_as_Int d) {
 297         int len = s.arr.length;
 298         Int64[] dst = d.arr;
 299         for (int i = 0; i < len; i++) {
 300             dst[i] = (Int64)s.arr[i];
 301         }
 302     }
 303 
 304     @Benchmark
 305     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 306     public void Ref_to_Ref_as_Obj_to_Ref_copy(Ref_as_Obj s, Ref_as_Ref d) {
 307         int len = s.arr.length;
 308         Q64long[] dst = d.arr;
 309         for (int i = 0; i < len; i++) {
 310             dst[i] = (Q64long)s.arr[i];
 311         }
 312     }
 313 
 314     @Benchmark
 315     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 316     public void Ref_to_Val_as_Obj_to_Ref_copy(Ref_as_Obj s, Val_as_Ref d) {
 317         int len = s.arr.length;
 318         Q64long[] dst = d.arr;
 319         for (int i = 0; i < len; i++) {
 320             dst[i] = (Q64long)s.arr[i];
 321         }
 322     }
 323 
 324     @Benchmark
 325     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 326     public void Ref_to_Val_as_Obj_to_Val_copy(Ref_as_Obj s, Val_as_Val d) {
 327         int len = s.arr.length;
 328         Q64long[] dst = d.arr;
 329         for (int i = 0; i < len; i++) {
 330             dst[i] = (Q64long)s.arr[i];
 331         }
 332     }
 333 
 334     @Benchmark
 335     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 336     public void Val_to_Obj_as_Obj_to_Obj_copy(Val_as_Obj s, Obj_as_Obj d) {
 337         int len = s.arr.length;
 338         Object[] dst = d.arr;
 339         for (int i = 0; i < len; i++) {
 340             dst[i] = s.arr[i];
 341         }
 342     }
 343 
 344     @Benchmark
 345     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 346     public void Val_to_Int_as_Obj_to_Obj_copy(Val_as_Obj s, Int_as_Obj d) {
 347         int len = s.arr.length;
 348         Object[] dst = d.arr;
 349         for (int i = 0; i < len; i++) {
 350             dst[i] = s.arr[i];
 351         }
 352     }
 353 
 354     @Benchmark
 355     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 356     public void Val_to_Ref_as_Obj_to_Obj_copy(Val_as_Obj s, Ref_as_Obj d) {
 357         int len = s.arr.length;
 358         Object[] dst = d.arr;
 359         for (int i = 0; i < len; i++) {
 360             dst[i] = s.arr[i];
 361         }
 362     }
 363 
 364     @Benchmark
 365     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 366     public void Val_to_Val_as_Obj_to_Obj_copy(Val_as_Obj s, Val_as_Obj d) {
 367         int len = s.arr.length;
 368         Object[] dst = d.arr;
 369         for (int i = 0; i < len; i++) {
 370             dst[i] = s.arr[i];
 371         }
 372     }
 373 
 374     @Benchmark
 375     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 376     public void Val_to_Int_as_Obj_to_Int_copy(Val_as_Obj s, Int_as_Int d) {
 377         int len = s.arr.length;
 378         Int64[] dst = d.arr;
 379         for (int i = 0; i < len; i++) {
 380             dst[i] = (Int64)s.arr[i];
 381         }
 382     }
 383 
 384     @Benchmark
 385     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 386     public void Val_to_Ref_as_Obj_to_Int_copy(Val_as_Obj s, Ref_as_Int d) {
 387         int len = s.arr.length;
 388         Int64[] dst = d.arr;
 389         for (int i = 0; i < len; i++) {
 390             dst[i] = (Int64)s.arr[i];
 391         }
 392     }
 393 
 394     @Benchmark
 395     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 396     public void Val_to_Val_as_Obj_to_Int_copy(Val_as_Obj s, Val_as_Int d) {
 397         int len = s.arr.length;
 398         Int64[] dst = d.arr;
 399         for (int i = 0; i < len; i++) {
 400             dst[i] = (Int64)s.arr[i];
 401         }
 402     }
 403 
 404     @Benchmark
 405     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 406     public void Val_to_Ref_as_Obj_to_Ref_copy(Val_as_Obj s, Ref_as_Ref d) {
 407         int len = s.arr.length;
 408         Q64long[] dst = d.arr;
 409         for (int i = 0; i < len; i++) {
 410             dst[i] = (Q64long)s.arr[i];
 411         }
 412     }
 413 
 414     @Benchmark
 415     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 416     public void Val_to_Val_as_Obj_to_Ref_copy(Val_as_Obj s, Val_as_Ref d) {
 417         int len = s.arr.length;
 418         Q64long[] dst = d.arr;
 419         for (int i = 0; i < len; i++) {
 420             dst[i] = (Q64long)s.arr[i];
 421         }
 422     }
 423 
 424     @Benchmark
 425     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 426     public void Val_to_Val_as_Obj_to_Val_copy(Val_as_Obj s, Val_as_Val d) {
 427         int len = s.arr.length;
 428         Q64long[] dst = d.arr;
 429         for (int i = 0; i < len; i++) {
 430             dst[i] = (Q64long)s.arr[i];
 431         }
 432     }
 433 
 434     @Benchmark
 435     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 436     public void Int_to_Obj_as_Int_to_Obj_copy(Int_as_Int s, Obj_as_Obj d) {
 437         int len = s.arr.length;
 438         Object[] dst = d.arr;
 439         for (int i = 0; i < len; i++) {
 440             dst[i] = s.arr[i];
 441         }
 442     }
 443 
 444     @Benchmark
 445     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 446     public void Int_to_Int_as_Int_to_Obj_copy(Int_as_Int s, Int_as_Obj d) {
 447         int len = s.arr.length;
 448         Object[] dst = d.arr;
 449         for (int i = 0; i < len; i++) {
 450             dst[i] = s.arr[i];
 451         }
 452     }
 453 
 454     @Benchmark
 455     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 456     public void Int_to_Ref_as_Int_to_Obj_copy(Int_as_Int s, Ref_as_Obj d) {
 457         int len = s.arr.length;
 458         Object[] dst = d.arr;
 459         for (int i = 0; i < len; i++) {
 460             dst[i] = s.arr[i];
 461         }
 462     }
 463 
 464     @Benchmark
 465     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 466     public void Int_to_Val_as_Int_to_Obj_copy(Int_as_Int s, Val_as_Obj d) {
 467         int len = s.arr.length;
 468         Object[] dst = d.arr;
 469         for (int i = 0; i < len; i++) {
 470             dst[i] = s.arr[i];
 471         }
 472     }
 473 
 474     @Benchmark
 475     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 476     public void Int_to_Int_as_Int_to_Int_copy(Int_as_Int s, Int_as_Int d) {
 477         int len = s.arr.length;
 478         Int64[] dst = d.arr;
 479         for (int i = 0; i < len; i++) {
 480             dst[i] = s.arr[i];
 481         }
 482     }
 483 
 484     @Benchmark
 485     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 486     public void Int_to_Ref_as_Int_to_Int_copy(Int_as_Int s, Ref_as_Int d) {
 487         int len = s.arr.length;
 488         Int64[] dst = d.arr;
 489         for (int i = 0; i < len; i++) {
 490             dst[i] = s.arr[i];
 491         }
 492     }
 493 
 494     @Benchmark
 495     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 496     public void Int_to_Val_as_Int_to_Int_copy(Int_as_Int s, Val_as_Int d) {
 497         int len = s.arr.length;
 498         Int64[] dst = d.arr;
 499         for (int i = 0; i < len; i++) {
 500             dst[i] = s.arr[i];
 501         }
 502     }
 503 
 504     @Benchmark
 505     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 506     public void Int_to_Ref_as_Int_to_Ref_copy(Int_as_Int s, Ref_as_Ref d) {
 507         int len = s.arr.length;
 508         Q64long[] dst = d.arr;
 509         for (int i = 0; i < len; i++) {
 510             dst[i] = (Q64long)s.arr[i];
 511         }
 512     }
 513 
 514     @Benchmark
 515     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 516     public void Int_to_Val_as_Int_to_Ref_copy(Int_as_Int s, Val_as_Ref d) {
 517         int len = s.arr.length;
 518         Q64long[] dst = d.arr;
 519         for (int i = 0; i < len; i++) {
 520             dst[i] = (Q64long)s.arr[i];
 521         }
 522     }
 523 
 524     @Benchmark
 525     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 526     public void Int_to_Val_as_Int_to_Val_copy(Int_as_Int s, Val_as_Val d) {
 527         int len = s.arr.length;
 528         Q64long[] dst = d.arr;
 529         for (int i = 0; i < len; i++) {
 530             dst[i] = (Q64long)s.arr[i];
 531         }
 532     }
 533 
 534     @Benchmark
 535     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 536     public void Ref_to_Obj_as_Int_to_Obj_copy(Ref_as_Int s, Obj_as_Obj d) {
 537         int len = s.arr.length;
 538         Object[] dst = d.arr;
 539         for (int i = 0; i < len; i++) {
 540             dst[i] = s.arr[i];
 541         }
 542     }
 543 
 544     @Benchmark
 545     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 546     public void Ref_to_Int_as_Int_to_Obj_copy(Ref_as_Int s, Int_as_Obj d) {
 547         int len = s.arr.length;
 548         Object[] dst = d.arr;
 549         for (int i = 0; i < len; i++) {
 550             dst[i] = s.arr[i];
 551         }
 552     }
 553 
 554     @Benchmark
 555     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 556     public void Ref_to_Ref_as_Int_to_Obj_copy(Ref_as_Int s, Ref_as_Obj d) {
 557         int len = s.arr.length;
 558         Object[] dst = d.arr;
 559         for (int i = 0; i < len; i++) {
 560             dst[i] = s.arr[i];
 561         }
 562     }
 563 
 564     @Benchmark
 565     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 566     public void Ref_to_Val_as_Int_to_Obj_copy(Ref_as_Int s, Val_as_Obj d) {
 567         int len = s.arr.length;
 568         Object[] dst = d.arr;
 569         for (int i = 0; i < len; i++) {
 570             dst[i] = s.arr[i];
 571         }
 572     }
 573 
 574     @Benchmark
 575     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 576     public void Ref_to_Int_as_Int_to_Int_copy(Ref_as_Int s, Int_as_Int d) {
 577         int len = s.arr.length;
 578         Int64[] dst = d.arr;
 579         for (int i = 0; i < len; i++) {
 580             dst[i] = s.arr[i];
 581         }
 582     }
 583 
 584     @Benchmark
 585     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 586     public void Ref_to_Ref_as_Int_to_Int_copy(Ref_as_Int s, Ref_as_Int d) {
 587         int len = s.arr.length;
 588         Int64[] dst = d.arr;
 589         for (int i = 0; i < len; i++) {
 590             dst[i] = s.arr[i];
 591         }
 592     }
 593 
 594     @Benchmark
 595     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 596     public void Ref_to_Val_as_Int_to_Int_copy(Ref_as_Int s, Val_as_Int d) {
 597         int len = s.arr.length;
 598         Int64[] dst = d.arr;
 599         for (int i = 0; i < len; i++) {
 600             dst[i] = s.arr[i];
 601         }
 602     }
 603 
 604     @Benchmark
 605     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 606     public void Ref_to_Ref_as_Int_to_Ref_copy(Ref_as_Int s, Ref_as_Ref d) {
 607         int len = s.arr.length;
 608         Q64long[] dst = d.arr;
 609         for (int i = 0; i < len; i++) {
 610             dst[i] = (Q64long)s.arr[i];
 611         }
 612     }
 613 
 614     @Benchmark
 615     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 616     public void Ref_to_Val_as_Int_to_Ref_copy(Ref_as_Int s, Val_as_Ref d) {
 617         int len = s.arr.length;
 618         Q64long[] dst = d.arr;
 619         for (int i = 0; i < len; i++) {
 620             dst[i] = (Q64long)s.arr[i];
 621         }
 622     }
 623 
 624     @Benchmark
 625     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 626     public void Ref_to_Val_as_Int_to_Val_copy(Ref_as_Int s, Val_as_Val d) {
 627         int len = s.arr.length;
 628         Q64long[] dst = d.arr;
 629         for (int i = 0; i < len; i++) {
 630             dst[i] = (Q64long)s.arr[i];
 631         }
 632     }
 633 
 634     @Benchmark
 635     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 636     public void Val_to_Obj_as_Int_to_Obj_copy(Val_as_Int s, Obj_as_Obj d) {
 637         int len = s.arr.length;
 638         Object[] dst = d.arr;
 639         for (int i = 0; i < len; i++) {
 640             dst[i] = s.arr[i];
 641         }
 642     }
 643 
 644     @Benchmark
 645     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 646     public void Val_to_Int_as_Int_to_Obj_copy(Val_as_Int s, Int_as_Obj d) {
 647         int len = s.arr.length;
 648         Object[] dst = d.arr;
 649         for (int i = 0; i < len; i++) {
 650             dst[i] = s.arr[i];
 651         }
 652     }
 653 
 654     @Benchmark
 655     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 656     public void Val_to_Ref_as_Int_to_Obj_copy(Val_as_Int s, Ref_as_Obj d) {
 657         int len = s.arr.length;
 658         Object[] dst = d.arr;
 659         for (int i = 0; i < len; i++) {
 660             dst[i] = s.arr[i];
 661         }
 662     }
 663 
 664     @Benchmark
 665     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 666     public void Val_to_Val_as_Int_to_Obj_copy(Val_as_Int s, Val_as_Obj d) {
 667         int len = s.arr.length;
 668         Object[] dst = d.arr;
 669         for (int i = 0; i < len; i++) {
 670             dst[i] = s.arr[i];
 671         }
 672     }
 673 
 674     @Benchmark
 675     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 676     public void Val_to_Int_as_Int_to_Int_copy(Val_as_Int s, Int_as_Int d) {
 677         int len = s.arr.length;
 678         Int64[] dst = d.arr;
 679         for (int i = 0; i < len; i++) {
 680             dst[i] = s.arr[i];
 681         }
 682     }
 683 
 684     @Benchmark
 685     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 686     public void Val_to_Ref_as_Int_to_Int_copy(Val_as_Int s, Ref_as_Int d) {
 687         int len = s.arr.length;
 688         Int64[] dst = d.arr;
 689         for (int i = 0; i < len; i++) {
 690             dst[i] = s.arr[i];
 691         }
 692     }
 693 
 694     @Benchmark
 695     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 696     public void Val_to_Val_as_Int_to_Int_copy(Val_as_Int s, Val_as_Int d) {
 697         int len = s.arr.length;
 698         Int64[] dst = d.arr;
 699         for (int i = 0; i < len; i++) {
 700             dst[i] = s.arr[i];
 701         }
 702     }
 703 
 704     @Benchmark
 705     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 706     public void Val_to_Ref_as_Int_to_Ref_copy(Val_as_Int s, Ref_as_Ref d) {
 707         int len = s.arr.length;
 708         Q64long[] dst = d.arr;
 709         for (int i = 0; i < len; i++) {
 710             dst[i] = (Q64long)s.arr[i];
 711         }
 712     }
 713 
 714     @Benchmark
 715     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 716     public void Val_to_Val_as_Int_to_Ref_copy(Val_as_Int s, Val_as_Ref d) {
 717         int len = s.arr.length;
 718         Q64long[] dst = d.arr;
 719         for (int i = 0; i < len; i++) {
 720             dst[i] = (Q64long)s.arr[i];
 721         }
 722     }
 723 
 724     @Benchmark
 725     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 726     public void Val_to_Val_as_Int_to_Val_copy(Val_as_Int s, Val_as_Val d) {
 727         int len = s.arr.length;
 728         Q64long[] dst = d.arr;
 729         for (int i = 0; i < len; i++) {
 730             dst[i] = (Q64long)s.arr[i];
 731         }
 732     }
 733 
 734     @Benchmark
 735     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 736     public void Ref_to_Obj_as_Ref_to_Obj_copy(Ref_as_Ref s, Obj_as_Obj d) {
 737         int len = s.arr.length;
 738         Object[] dst = d.arr;
 739         for (int i = 0; i < len; i++) {
 740             dst[i] = s.arr[i];
 741         }
 742     }
 743 
 744     @Benchmark
 745     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 746     public void Ref_to_Int_as_Ref_to_Obj_copy(Ref_as_Ref s, Int_as_Obj d) {
 747         int len = s.arr.length;
 748         Object[] dst = d.arr;
 749         for (int i = 0; i < len; i++) {
 750             dst[i] = s.arr[i];
 751         }
 752     }
 753 
 754     @Benchmark
 755     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 756     public void Ref_to_Ref_as_Ref_to_Obj_copy(Ref_as_Ref s, Ref_as_Obj d) {
 757         int len = s.arr.length;
 758         Object[] dst = d.arr;
 759         for (int i = 0; i < len; i++) {
 760             dst[i] = s.arr[i];
 761         }
 762     }
 763 
 764     @Benchmark
 765     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 766     public void Ref_to_Val_as_Ref_to_Obj_copy(Ref_as_Ref s, Val_as_Obj d) {
 767         int len = s.arr.length;
 768         Object[] dst = d.arr;
 769         for (int i = 0; i < len; i++) {
 770             dst[i] = s.arr[i];
 771         }
 772     }
 773 
 774     @Benchmark
 775     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 776     public void Ref_to_Int_as_Ref_to_Int_copy(Ref_as_Ref s, Int_as_Int d) {
 777         int len = s.arr.length;
 778         Int64[] dst = d.arr;
 779         for (int i = 0; i < len; i++) {
 780             dst[i] = s.arr[i];
 781         }
 782     }
 783 
 784     @Benchmark
 785     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 786     public void Ref_to_Ref_as_Ref_to_Int_copy(Ref_as_Ref s, Ref_as_Int d) {
 787         int len = s.arr.length;
 788         Int64[] dst = d.arr;
 789         for (int i = 0; i < len; i++) {
 790             dst[i] = s.arr[i];
 791         }
 792     }
 793 
 794     @Benchmark
 795     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 796     public void Ref_to_Val_as_Ref_to_Int_copy(Ref_as_Ref s, Val_as_Int d) {
 797         int len = s.arr.length;
 798         Int64[] dst = d.arr;
 799         for (int i = 0; i < len; i++) {
 800             dst[i] = s.arr[i];
 801         }
 802     }
 803 
 804     @Benchmark
 805     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 806     public void Ref_to_Ref_as_Ref_to_Ref_copy(Ref_as_Ref s, Ref_as_Ref d) {
 807         int len = s.arr.length;
 808         Q64long[] dst = d.arr;
 809         for (int i = 0; i < len; i++) {
 810             dst[i] = s.arr[i];
 811         }
 812     }
 813 
 814     @Benchmark
 815     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 816     public void Ref_to_Val_as_Ref_to_Ref_copy(Ref_as_Ref s, Val_as_Ref d) {
 817         int len = s.arr.length;
 818         Q64long[] dst = d.arr;
 819         for (int i = 0; i < len; i++) {
 820             dst[i] = s.arr[i];
 821         }
 822     }
 823 
 824     @Benchmark
 825     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 826     public void Ref_to_Val_as_Ref_to_Val_copy(Ref_as_Ref s, Val_as_Val d) {
 827         int len = s.arr.length;
 828         Q64long[] dst = d.arr;
 829         for (int i = 0; i < len; i++) {
 830             dst[i] = s.arr[i];
 831         }
 832     }
 833 
 834     @Benchmark
 835     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 836     public void Val_to_Obj_as_Ref_to_Obj_copy(Val_as_Ref s, Obj_as_Obj d) {
 837         int len = s.arr.length;
 838         Object[] dst = d.arr;
 839         for (int i = 0; i < len; i++) {
 840             dst[i] = s.arr[i];
 841         }
 842     }
 843 
 844     @Benchmark
 845     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 846     public void Val_to_Int_as_Ref_to_Obj_copy(Val_as_Ref s, Int_as_Obj d) {
 847         int len = s.arr.length;
 848         Object[] dst = d.arr;
 849         for (int i = 0; i < len; i++) {
 850             dst[i] = s.arr[i];
 851         }
 852     }
 853 
 854     @Benchmark
 855     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 856     public void Val_to_Ref_as_Ref_to_Obj_copy(Val_as_Ref s, Ref_as_Obj d) {
 857         int len = s.arr.length;
 858         Object[] dst = d.arr;
 859         for (int i = 0; i < len; i++) {
 860             dst[i] = s.arr[i];
 861         }
 862     }
 863 
 864     @Benchmark
 865     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 866     public void Val_to_Val_as_Ref_to_Obj_copy(Val_as_Ref s, Val_as_Obj d) {
 867         int len = s.arr.length;
 868         Object[] dst = d.arr;
 869         for (int i = 0; i < len; i++) {
 870             dst[i] = s.arr[i];
 871         }
 872     }
 873 
 874     @Benchmark
 875     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 876     public void Val_to_Int_as_Ref_to_Int_copy(Val_as_Ref s, Int_as_Int d) {
 877         int len = s.arr.length;
 878         Int64[] dst = d.arr;
 879         for (int i = 0; i < len; i++) {
 880             dst[i] = s.arr[i];
 881         }
 882     }
 883 
 884     @Benchmark
 885     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 886     public void Val_to_Ref_as_Ref_to_Int_copy(Val_as_Ref s, Ref_as_Int d) {
 887         int len = s.arr.length;
 888         Int64[] dst = d.arr;
 889         for (int i = 0; i < len; i++) {
 890             dst[i] = s.arr[i];
 891         }
 892     }
 893 
 894     @Benchmark
 895     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 896     public void Val_to_Val_as_Ref_to_Int_copy(Val_as_Ref s, Val_as_Int d) {
 897         int len = s.arr.length;
 898         Int64[] dst = d.arr;
 899         for (int i = 0; i < len; i++) {
 900             dst[i] = s.arr[i];
 901         }
 902     }
 903 
 904     @Benchmark
 905     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 906     public void Val_to_Ref_as_Ref_to_Ref_copy(Val_as_Ref s, Ref_as_Ref d) {
 907         int len = s.arr.length;
 908         Q64long[] dst = d.arr;
 909         for (int i = 0; i < len; i++) {
 910             dst[i] = s.arr[i];
 911         }
 912     }
 913 
 914     @Benchmark
 915     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 916     public void Val_to_Val_as_Ref_to_Ref_copy(Val_as_Ref s, Val_as_Ref d) {
 917         int len = s.arr.length;
 918         Q64long[] dst = d.arr;
 919         for (int i = 0; i < len; i++) {
 920             dst[i] = s.arr[i];
 921         }
 922     }
 923 
 924     @Benchmark
 925     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 926     public void Val_to_Val_as_Ref_to_Val_copy(Val_as_Ref s, Val_as_Val d) {
 927         int len = s.arr.length;
 928         Q64long[] dst = d.arr;
 929         for (int i = 0; i < len; i++) {
 930             dst[i] = s.arr[i];
 931         }
 932     }
 933 
 934     @Benchmark
 935     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 936     public void Val_to_Obj_as_Val_to_Obj_copy(Val_as_Val s, Obj_as_Obj d) {
 937         int len = s.arr.length;
 938         Object[] dst = d.arr;
 939         for (int i = 0; i < len; i++) {
 940             dst[i] = s.arr[i];
 941         }
 942     }
 943 
 944     @Benchmark
 945     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 946     public void Val_to_Int_as_Val_to_Obj_copy(Val_as_Val s, Int_as_Obj d) {
 947         int len = s.arr.length;
 948         Object[] dst = d.arr;
 949         for (int i = 0; i < len; i++) {
 950             dst[i] = s.arr[i];
 951         }
 952     }
 953 
 954     @Benchmark
 955     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 956     public void Val_to_Ref_as_Val_to_Obj_copy(Val_as_Val s, Ref_as_Obj d) {
 957         int len = s.arr.length;
 958         Object[] dst = d.arr;
 959         for (int i = 0; i < len; i++) {
 960             dst[i] = s.arr[i];
 961         }
 962     }
 963 
 964     @Benchmark
 965     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 966     public void Val_to_Val_as_Val_to_Obj_copy(Val_as_Val s, Val_as_Obj d) {
 967         int len = s.arr.length;
 968         Object[] dst = d.arr;
 969         for (int i = 0; i < len; i++) {
 970             dst[i] = s.arr[i];
 971         }
 972     }
 973 
 974     @Benchmark
 975     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 976     public void Val_to_Int_as_Val_to_Int_copy(Val_as_Val s, Int_as_Int d) {
 977         int len = s.arr.length;
 978         Int64[] dst = d.arr;
 979         for (int i = 0; i < len; i++) {
 980             dst[i] = s.arr[i];
 981         }
 982     }
 983 
 984     @Benchmark
 985     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 986     public void Val_to_Ref_as_Val_to_Int_copy(Val_as_Val s, Ref_as_Int d) {
 987         int len = s.arr.length;
 988         Int64[] dst = d.arr;
 989         for (int i = 0; i < len; i++) {
 990             dst[i] = s.arr[i];
 991         }
 992     }
 993 
 994     @Benchmark
 995     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
 996     public void Val_to_Val_as_Val_to_Int_copy(Val_as_Val s, Val_as_Int d) {
 997         int len = s.arr.length;
 998         Int64[] dst = d.arr;
 999         for (int i = 0; i < len; i++) {
1000             dst[i] = s.arr[i];
1001         }
1002     }
1003 
1004     @Benchmark
1005     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
1006     public void Val_to_Ref_as_Val_to_Ref_copy(Val_as_Val s, Ref_as_Ref d) {
1007         int len = s.arr.length;
1008         Q64long[] dst = d.arr;
1009         for (int i = 0; i < len; i++) {
1010             dst[i] = s.arr[i];
1011         }
1012     }
1013 
1014     @Benchmark
1015     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
1016     public void Val_to_Val_as_Val_to_Ref_copy(Val_as_Val s, Val_as_Ref d) {
1017         int len = s.arr.length;
1018         Q64long[] dst = d.arr;
1019         for (int i = 0; i < len; i++) {
1020             dst[i] = s.arr[i];
1021         }
1022     }
1023 
1024     @Benchmark
1025     @CompilerControl(CompilerControl.Mode.DONT_INLINE)
1026     public void Val_to_Val_as_Val_to_Val_copy(Val_as_Val s, Val_as_Val d) {
1027         int len = s.arr.length;
1028         Q64long[] dst = d.arr;
1029         for (int i = 0; i < len; i++) {
1030             dst[i] = s.arr[i];
1031         }
1032     }
1033 
1034 
1035 }