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