Bubble Sort.

Write a program that sorts an array using bubble sort algorithm.

The size of the array will be located at the address array_size, the integer array (32-bit integer words) will start at the address array_start.

The program should sort the array in ascending order. Your program will be tested with different array sizes and different values in the array.

The complete task description can also be found here, Makefile and template files for your own testing can be found on GitLab.

Input: Cache optimized sorting.
In: Size of the array located at address array_size, the array start is located at the address array_start.
Out: Sorted array of length array_size

Your program will be run with the following arguments: --dump-cycles --cycle-limit 100000 --asm submission.S
Your program will be scored by this following metric: Runtime of the program in cycles.

For interactive solution, you can use QtRvSim. The web version of the simulator is located here.
Top Scores (cycles)
  • henjaa-3
    1231
  • svehlda2
    1233
  • melker (melsth-0)
    1276
  • Aspirin (Aspirin_LTU_2023)
    1407
  • julgel-3
    1467
  • moajoh
    1477
  • _
    1483
  • aapkii-3
    1530
  • nkin
    1557
  • edvcal-1
    1570
  • Ludado-1
    1599
  • guswal-1
    1661
  • jacwst-0
    1671
  • eriebu-0
    1674
  • joeott-1
    1781
  • aleblo-1
    1802
  • Tim
    1826
  • alvsta-1
    1854
  • sagand-1
    1880
  • mahrus
    1887
  • emisee-3
    1934
  • fliqli
    1949
  • rasjac-10
    1986
  • jolstu-10
    2003
  • albinringstrom
    2008
  • mardyh-3
    2056
  • filekh-1
    2059
  • jacras-1
    2099
  • frehgl-1
    2175
  • Filiver
    2219
  • sebbe
    2664
  • teodur-1
    2774
  • paoron-3
    2780
  • mlenc
    2910
  • reference
    3541