Skip to content

Performance: CPU

The compiler is measured on twenty programs, each written four times: in the xc language, in Objective-C with ARC, in C++ and in Swift, doing the same work with the same algorithm and the same data. All are built with optimisation (-O3 for xc, Objective-C and C++, -O for Swift), every version prints a checksum, and a run only counts if all four checksums agree. Every program, in all four languages, is on the benchmark sources page; each benchmark’s name below links to its own. On x86-64 the C++ source is built twice, with clang and with GCC (g++ -O3), on both targets, so each carries a column for each C++ compiler.

Each figure is measured with the released 0.86 xcc on two machines:

  • arm64: an Apple MacBook Pro with an M4 Max (12 performance and 4 efficiency cores), macOS; Apple clang 17.0.0, GCC 16.2.0 and Swift 6.2;
  • x86-64: an AMD Ryzen 9 9955HX (16 cores, 32 threads), Linux; GCC 15.2.0, clang 21.1.8 and Swift 6.1.3; its CPU frequency governor is performance (amd-pstate-epp) for the run.

Every compiler is given the machine’s full instruction set: -march=native (x86-64) or -mcpu=native (arm64) for clang and GCC, -target-cpu native for Swift. xc needs no flag for that: with its default -msimd=auto, xcc builds each vectorised function for SSE2, AVX2 and AVX-512 and the program picks one when it starts. Nothing else is set: no link-time optimisation, no profile-guided build, no -ffast-math, on any side.

Times are seconds for the timed region, the best of five runs, each run waiting until the machine is otherwise idle.

How much faster xc’s code runs than each language’s, as the geometric mean over nineteen of the twenty benchmarks:

xc compared witharm64 (Apple M4 Max)x86-64 (AMD Ryzen 9 9955HX)
Objective-C1.38× faster1.20× faster
C++ (clang)1.07× faster1.08× slower
C++ (GCC)1.15× faster1.08× faster
Swift1.37× faster1.37× faster

On arm64 xc is ahead of all of them. On x86-64 xc is ahead of Objective-C, C++ (GCC) and Swift and behind C++ (clang).

The twentieth benchmark, matrix_mul_f32, is kept out of those means. xcc recognises its loop nest and replaces it with a matrix kernel of its own, which makes xc tens to hundreds of times faster at that one operation; counted in, it would dominate means that stand for ordinary code, and most programs do not multiply matrices. Its figures are under Matrix multiplies.

Each row is a benchmark, each dot one language: how much faster or slower xc is than that language. Dots left of the centre line are benchmarks xc wins. Choose a release above a chart to see how it stood then; the rows stay in 0.86’s order. Releases before 0.65 were measured against Objective-C alone, apart from matrix_mul_f32, which was added later and measured against all three.

Release:
arm64: xc against each language, per benchmark (0.62)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.21× slower than Objective-Cfloat_mathfloat_math: the four programsfloat_math: xc is 1.48× slower than Objective-Csort_smallsort_small: the four programssort_small: xc is 1.29× slower than Objective-Cpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.14× slower than Objective-Cstruct_copystruct_copy: the four programsstruct_copy: xc is 1.21× slower than Objective-Carc_arrayarc_array: the four programsarc_array: xc is 5.6× faster than Objective-Carray_maparray_map: the four programsarray_map: xc is 1.43× slower than Objective-Cmem_copymem_copy: the four programsmem_copy: xc is 1.80× slower than Objective-Cmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.83× slower than Objective-Cint_accumint_accum: the four programsint_accum: xc is 1.12× slower than Objective-Cbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.11× slower than Objective-Chash_mixhash_mix: the four programshash_mix: xc is 1.03× slower than Objective-Cbit_opsbit_ops: the four programsbit_ops: xc is 1.13× slower than Objective-Ccall_depthcall_depth: the four programscall_depth: xc is 1.06× faster than Objective-Carray_sumarray_sum: the four programsarray_sum: xc is the same than Objective-Csievesieve: the four programssieve: xc is 1.30× faster than Objective-Cstring_scanstring_scan: the four programsstring_scan: xc is 2.6× faster than Objective-Cmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 1.03× faster than Objective-Cmatrix_mul_f32: xc is 1.03× faster than C++ (clang)matrix_mul_f32: xc is 1.03× slower than Swift
arm64: xc against each language, per benchmark (0.62)
arm64: xc against each language, per benchmark (0.63)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.22× slower than Objective-Cfloat_mathfloat_math: the four programsfloat_math: xc is 1.45× slower than Objective-Csort_smallsort_small: the four programssort_small: xc is 1.28× slower than Objective-Cpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.14× slower than Objective-Cstruct_copystruct_copy: the four programsstruct_copy: xc is 1.17× slower than Objective-Carc_arrayarc_array: the four programsarc_array: xc is 5.6× faster than Objective-Carray_maparray_map: the four programsarray_map: xc is 1.38× slower than Objective-Cmem_copymem_copy: the four programsmem_copy: xc is 1.78× slower than Objective-Cmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.83× slower than Objective-Cint_accumint_accum: the four programsint_accum: xc is 1.12× slower than Objective-Cbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.11× slower than Objective-Chash_mixhash_mix: the four programshash_mix: xc is 1.04× slower than Objective-Cbit_opsbit_ops: the four programsbit_ops: xc is 1.12× slower than Objective-Ccall_depthcall_depth: the four programscall_depth: xc is 1.07× faster than Objective-Carray_sumarray_sum: the four programsarray_sum: xc is the same than Objective-Csievesieve: the four programssieve: xc is 1.30× faster than Objective-Cstring_scanstring_scan: the four programsstring_scan: xc is 2.6× faster than Objective-Cmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 1.05× faster than Objective-Cmatrix_mul_f32: xc is 1.05× faster than C++ (clang)matrix_mul_f32: xc is 1.02× slower than Swift
arm64: xc against each language, per benchmark (0.63)
arm64: xc against each language, per benchmark (0.64)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.22× slower than Objective-Cfloat_mathfloat_math: the four programsfloat_math: xc is 1.48× slower than Objective-Csort_smallsort_small: the four programssort_small: xc is 1.34× slower than Objective-Cpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.14× slower than Objective-Cstruct_copystruct_copy: the four programsstruct_copy: xc is 1.25× slower than Objective-Carc_arrayarc_array: the four programsarc_array: xc is 5.6× faster than Objective-Carray_maparray_map: the four programsarray_map: xc is 1.37× slower than Objective-Cmem_copymem_copy: the four programsmem_copy: xc is 1.78× slower than Objective-Cmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.82× slower than Objective-Cint_accumint_accum: the four programsint_accum: xc is 1.12× slower than Objective-Cbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.11× slower than Objective-Chash_mixhash_mix: the four programshash_mix: xc is 1.06× slower than Objective-Cbit_opsbit_ops: the four programsbit_ops: xc is 1.12× slower than Objective-Ccall_depthcall_depth: the four programscall_depth: xc is 1.07× faster than Objective-Carray_sumarray_sum: the four programsarray_sum: xc is the same than Objective-Csievesieve: the four programssieve: xc is 1.30× faster than Objective-Cstring_scanstring_scan: the four programsstring_scan: xc is 2.6× faster than Objective-Cmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 1.04× faster than Objective-Cmatrix_mul_f32: xc is 1.05× faster than C++ (clang)matrix_mul_f32: xc is 1.02× slower than Swift
arm64: xc against each language, per benchmark (0.64)
arm64: xc against each language, per benchmark (0.65)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.22× slower than Objective-Cint_muldiv: xc is 1.22× slower than C++ (clang)int_muldiv: xc is 1.07× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.19× slower than Objective-Cfloat_math: xc is 1.19× slower than C++ (clang)float_math: xc is 1.16× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.18× slower than Objective-Csort_small: xc is 1.14× slower than C++ (clang)sort_small: xc is 1.19× faster than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.72× faster than Objective-Cpoly_dispatch: xc is 1.18× slower than C++ (clang)poly_dispatch: xc is 3.2× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.46× faster than Objective-Cstruct_copy: xc is 1.45× faster than C++ (clang)struct_copy: xc is 1.46× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 9.6× faster than Objective-Carc_array: xc is 1.04× slower than C++ (clang)arc_array: xc is 1.64× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 1.36× faster than Objective-Carray_map: xc is 1.02× slower than C++ (clang)array_map: xc is 1.01× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.63× faster than Objective-Cmem_copy: xc is 1.05× slower than C++ (clang)mem_copy: xc is 1.06× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.75× slower than Objective-Cmatrix_mul: xc is 1.73× slower than C++ (clang)matrix_mul: xc is 2.9× faster than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is 1.01× faster than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is 1.02× faster than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than Swiftbit_opsbit_ops: the four programsbit_ops: xc is 1.02× faster than Objective-Cbit_ops: xc is 1.03× faster than C++ (clang)bit_ops: xc is 1.03× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.08× faster than Objective-Ccall_depth: xc is 1.08× faster than C++ (clang)call_depth: xc is 1.01× slower than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.05× slower than Objective-Carray_sum: xc is 1.05× slower than C++ (clang)array_sum: xc is 1.80× faster than Swiftsievesieve: the four programssieve: xc is 1.34× faster than Objective-Csieve: xc is 1.35× faster than C++ (clang)sieve: xc is 1.77× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 2.5× faster than Objective-Cstring_scan: xc is 2.6× faster than C++ (clang)string_scan: xc is 2.6× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 1.77× faster than Objective-Cmatrix_mul_f32: xc is 1.77× faster than C++ (clang)matrix_mul_f32: xc is 1.66× faster than Swift
arm64: xc against each language, per benchmark (0.65)
arm64: xc against each language, per benchmark (0.66)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.22× slower than Objective-Cint_muldiv: xc is 1.21× slower than C++ (clang)int_muldiv: xc is 1.07× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.18× slower than Objective-Cfloat_math: xc is 1.19× slower than C++ (clang)float_math: xc is 1.16× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.18× slower than Objective-Csort_small: xc is 1.13× slower than C++ (clang)sort_small: xc is 1.19× faster than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.72× faster than Objective-Cpoly_dispatch: xc is 1.18× slower than C++ (clang)poly_dispatch: xc is 3.2× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.45× faster than Objective-Cstruct_copy: xc is 1.45× faster than C++ (clang)struct_copy: xc is 1.46× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 9.7× faster than Objective-Carc_array: xc is the same than C++ (clang)arc_array: xc is 1.71× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 1.39× faster than Objective-Carray_map: xc is 1.03× slower than C++ (clang)array_map: xc is the same than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.62× faster than Objective-Cmem_copy: xc is 1.05× slower than C++ (clang)mem_copy: xc is 1.06× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.77× slower than Objective-Cmatrix_mul: xc is 1.74× slower than C++ (clang)matrix_mul: xc is 2.9× faster than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is 1.01× faster than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.02× slower than Objective-Cbranch_mix: xc is 1.02× slower than C++ (clang)branch_mix: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than Swiftbit_opsbit_ops: the four programsbit_ops: xc is 1.03× faster than Objective-Cbit_ops: xc is 1.03× faster than C++ (clang)bit_ops: xc is 1.05× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.08× faster than Objective-Ccall_depth: xc is 1.08× faster than C++ (clang)call_depth: xc is the same than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.04× slower than Objective-Carray_sum: xc is 1.04× slower than C++ (clang)array_sum: xc is 1.79× faster than Swiftsievesieve: the four programssieve: xc is 1.34× faster than Objective-Csieve: xc is 1.36× faster than C++ (clang)sieve: xc is 1.78× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 2.5× faster than Objective-Cstring_scan: xc is 2.6× faster than C++ (clang)string_scan: xc is 2.6× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 1.76× faster than Objective-Cmatrix_mul_f32: xc is 1.76× faster than C++ (clang)matrix_mul_f32: xc is 1.64× faster than Swift
arm64: xc against each language, per benchmark (0.66)
arm64: xc against each language, per benchmark (0.7)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.22× slower than Objective-Cint_muldiv: xc is 1.22× slower than C++ (clang)int_muldiv: xc is 1.07× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.21× slower than Objective-Cfloat_math: xc is 1.22× slower than C++ (clang)float_math: xc is 1.19× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.22× slower than Objective-Csort_small: xc is 1.17× slower than C++ (clang)sort_small: xc is 1.22× faster than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.73× faster than Objective-Cpoly_dispatch: xc is 1.17× slower than C++ (clang)poly_dispatch: xc is 3.2× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.44× faster than Objective-Cstruct_copy: xc is 1.43× faster than C++ (clang)struct_copy: xc is 1.45× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 9.7× faster than Objective-Carc_array: xc is 1.07× slower than C++ (clang)arc_array: xc is 1.59× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 1.42× faster than Objective-Carray_map: xc is the same than C++ (clang)array_map: xc is the same than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.65× faster than Objective-Cmem_copy: xc is 1.05× slower than C++ (clang)mem_copy: xc is 1.06× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.75× slower than Objective-Cmatrix_mul: xc is 1.72× slower than C++ (clang)matrix_mul: xc is 2.9× faster than Swiftint_accumint_accum: the four programsint_accum: xc is 1.02× faster than Objective-Cint_accum: xc is 1.02× faster than C++ (clang)int_accum: xc is 1.03× faster than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.09× faster than Objective-Cbranch_mix: xc is 1.09× faster than C++ (clang)branch_mix: xc is 1.11× faster than Swifthash_mixhash_mix: the four programshash_mix: xc is 1.12× faster than Objective-Chash_mix: xc is 1.04× faster than C++ (clang)hash_mix: xc is the same than Swiftbit_opsbit_ops: the four programsbit_ops: xc is 1.01× faster than Objective-Cbit_ops: xc is 1.01× faster than C++ (clang)bit_ops: xc is 1.01× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.06× faster than Objective-Ccall_depth: xc is 1.06× faster than C++ (clang)call_depth: xc is 1.02× slower than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.01× slower than Objective-Carray_sum: xc is 1.01× slower than C++ (clang)array_sum: xc is 1.93× faster than Swiftsievesieve: the four programssieve: xc is 1.36× faster than Objective-Csieve: xc is 1.37× faster than C++ (clang)sieve: xc is 1.79× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 2.5× faster than Objective-Cstring_scan: xc is 2.6× faster than C++ (clang)string_scan: xc is 2.6× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 1.72× faster than Objective-Cmatrix_mul_f32: xc is 1.72× faster than C++ (clang)matrix_mul_f32: xc is 1.61× faster than Swift
arm64: xc against each language, per benchmark (0.7)
arm64: xc against each language, per benchmark (0.71)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.22× slower than Objective-Cint_muldiv: xc is 1.22× slower than C++ (clang)int_muldiv: xc is 1.07× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.17× slower than Objective-Cfloat_math: xc is 1.18× slower than C++ (clang)float_math: xc is 1.16× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.21× slower than Objective-Csort_small: xc is 1.16× slower than C++ (clang)sort_small: xc is 1.18× faster than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.73× faster than Objective-Cpoly_dispatch: xc is 1.18× slower than C++ (clang)poly_dispatch: xc is 3.1× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.43× faster than Objective-Cstruct_copy: xc is 1.44× faster than C++ (clang)struct_copy: xc is 1.44× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 9.7× faster than Objective-Carc_array: xc is 1.06× slower than C++ (clang)arc_array: xc is 1.61× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 1.37× faster than Objective-Carray_map: xc is 1.04× slower than C++ (clang)array_map: xc is the same than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.63× faster than Objective-Cmem_copy: xc is 1.05× slower than C++ (clang)mem_copy: xc is 1.05× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.75× slower than Objective-Cmatrix_mul: xc is 1.72× slower than C++ (clang)matrix_mul: xc is 2.9× faster than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is 1.01× faster than C++ (clang)int_accum: xc is 1.02× faster than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is 1.01× faster than C++ (clang)branch_mix: xc is 1.02× faster than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is 1.01× slower than C++ (clang)hash_mix: xc is the same than Swiftbit_opsbit_ops: the four programsbit_ops: xc is 1.03× faster than Objective-Cbit_ops: xc is 1.03× faster than C++ (clang)bit_ops: xc is 1.04× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.08× faster than Objective-Ccall_depth: xc is 1.08× faster than C++ (clang)call_depth: xc is 1.01× slower than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.02× slower than Objective-Carray_sum: xc is 1.03× slower than C++ (clang)array_sum: xc is 1.85× faster than Swiftsievesieve: the four programssieve: xc is 1.36× faster than Objective-Csieve: xc is 1.37× faster than C++ (clang)sieve: xc is 1.80× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 2.5× faster than Objective-Cstring_scan: xc is 2.6× faster than C++ (clang)string_scan: xc is 2.6× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 153× faster than Objective-Cmatrix_mul_f32: xc is 153× faster than C++ (clang)matrix_mul_f32: xc is 143× faster than Swift
arm64: xc against each language, per benchmark (0.71)
arm64: xc against each language, per benchmark (0.72)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.22× slower than Objective-Cint_muldiv: xc is 1.21× slower than C++ (clang)int_muldiv: xc is 1.08× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.19× slower than Objective-Cfloat_math: xc is 1.19× slower than C++ (clang)float_math: xc is 1.17× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.23× slower than Objective-Csort_small: xc is 1.18× slower than C++ (clang)sort_small: xc is 1.15× faster than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.73× faster than Objective-Cpoly_dispatch: xc is 1.17× slower than C++ (clang)poly_dispatch: xc is 3.2× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.42× faster than Objective-Cstruct_copy: xc is 1.43× faster than C++ (clang)struct_copy: xc is 1.45× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 9.7× faster than Objective-Carc_array: xc is 1.05× slower than C++ (clang)arc_array: xc is 1.63× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 1.38× faster than Objective-Carray_map: xc is 1.01× faster than C++ (clang)array_map: xc is 1.01× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.63× faster than Objective-Cmem_copy: xc is 1.05× slower than C++ (clang)mem_copy: xc is 1.06× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.76× slower than Objective-Cmatrix_mul: xc is 1.73× slower than C++ (clang)matrix_mul: xc is 2.9× faster than Swiftint_accumint_accum: the four programsint_accum: xc is 1.01× faster than Objective-Cint_accum: xc is 1.01× faster than C++ (clang)int_accum: xc is 1.02× faster than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is 1.02× faster than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than Swiftbit_opsbit_ops: the four programsbit_ops: xc is 1.03× faster than Objective-Cbit_ops: xc is 1.03× faster than C++ (clang)bit_ops: xc is 1.05× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.08× faster than Objective-Ccall_depth: xc is 1.08× faster than C++ (clang)call_depth: xc is 1.01× slower than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.04× slower than Objective-Carray_sum: xc is 1.04× slower than C++ (clang)array_sum: xc is 1.81× faster than Swiftsievesieve: the four programssieve: xc is 1.26× faster than Objective-Csieve: xc is 1.27× faster than C++ (clang)sieve: xc is 1.67× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 2.5× faster than Objective-Cstring_scan: xc is 2.6× faster than C++ (clang)string_scan: xc is 2.6× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 325× faster than Objective-Cmatrix_mul_f32: xc is 327× faster than C++ (clang)matrix_mul_f32: xc is 313× faster than Swift
arm64: xc against each language, per benchmark (0.72)
arm64: xc against each language, per benchmark (0.73)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.22× slower than Objective-Cint_muldiv: xc is 1.22× slower than C++ (clang)int_muldiv: xc is 1.08× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.19× slower than Objective-Cfloat_math: xc is 1.19× slower than C++ (clang)float_math: xc is 1.17× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.08× slower than Objective-Csort_small: xc is 1.04× slower than C++ (clang)sort_small: xc is 1.28× faster than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 2.1× faster than Objective-Cpoly_dispatch: xc is 1.05× faster than C++ (clang)poly_dispatch: xc is 3.9× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.43× faster than Objective-Cstruct_copy: xc is 1.44× faster than C++ (clang)struct_copy: xc is 1.44× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 9.7× faster than Objective-Carc_array: xc is 1.05× slower than C++ (clang)arc_array: xc is 1.63× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 1.37× faster than Objective-Carray_map: xc is 1.01× slower than C++ (clang)array_map: xc is 1.01× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.64× faster than Objective-Cmem_copy: xc is 1.05× slower than C++ (clang)mem_copy: xc is 1.06× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.02× slower than Objective-Cmatrix_mul: xc is the same than C++ (clang)matrix_mul: xc is 5.0× faster than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is 1.01× faster than C++ (clang)int_accum: xc is 1.01× faster than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is 1.02× faster than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than Swiftbit_opsbit_ops: the four programsbit_ops: xc is 1.03× faster than Objective-Cbit_ops: xc is 1.04× faster than C++ (clang)bit_ops: xc is 1.04× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.06× faster than Objective-Ccall_depth: xc is 1.07× faster than C++ (clang)call_depth: xc is 1.02× slower than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.10× faster than Objective-Carray_sum: xc is 1.09× faster than C++ (clang)array_sum: xc is 2.1× faster than Swiftsievesieve: the four programssieve: xc is 1.39× faster than Objective-Csieve: xc is 1.40× faster than C++ (clang)sieve: xc is 1.83× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 2.5× faster than Objective-Cstring_scan: xc is 2.6× faster than C++ (clang)string_scan: xc is 2.6× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 326× faster than Objective-Cmatrix_mul_f32: xc is 327× faster than C++ (clang)matrix_mul_f32: xc is 323× faster than Swift
arm64: xc against each language, per benchmark (0.73)
arm64: xc against each language, per benchmark (0.74)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.20× slower than Objective-Cint_muldiv: xc is 1.20× slower than C++ (clang)int_muldiv: xc is 1.20× slower than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.19× slower than Objective-Cfloat_math: xc is 1.19× slower than C++ (clang)float_math: xc is 1.19× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.06× slower than Objective-Csort_small: xc is 1.02× slower than C++ (clang)sort_small: xc is 1.36× faster than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 2.2× faster than Objective-Cpoly_dispatch: xc is 1.07× faster than C++ (clang)poly_dispatch: xc is 3.9× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.45× faster than Objective-Cstruct_copy: xc is 1.45× faster than C++ (clang)struct_copy: xc is 1.46× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 9.5× faster than Objective-Carc_array: xc is 1.06× slower than C++ (clang)arc_array: xc is 1.62× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 1.38× faster than Objective-Carray_map: xc is 1.01× slower than C++ (clang)array_map: xc is 1.01× slower than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.70× faster than Objective-Cmem_copy: xc is 1.04× slower than C++ (clang)mem_copy: xc is 1.02× slower than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.03× faster than Objective-Cmatrix_mul: xc is 1.04× faster than C++ (clang)matrix_mul: xc is 5.1× faster than Swiftint_accumint_accum: the four programsint_accum: xc is 1.01× faster than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is 1.01× faster than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is 1.02× faster than Swifthash_mixhash_mix: the four programshash_mix: xc is 1.01× slower than Objective-Chash_mix: xc is 1.01× slower than C++ (clang)hash_mix: xc is 1.01× slower than Swiftbit_opsbit_ops: the four programsbit_ops: xc is 1.04× faster than Objective-Cbit_ops: xc is 1.04× faster than C++ (clang)bit_ops: xc is 1.04× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.06× faster than Objective-Ccall_depth: xc is 1.07× faster than C++ (clang)call_depth: xc is 1.07× faster than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.10× faster than Objective-Carray_sum: xc is 1.09× faster than C++ (clang)array_sum: xc is 1.09× faster than Swiftsievesieve: the four programssieve: xc is 1.39× faster than Objective-Csieve: xc is 1.39× faster than C++ (clang)sieve: xc is 1.87× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 2.6× faster than Objective-Cstring_scan: xc is 2.6× faster than C++ (clang)string_scan: xc is 2.6× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 325× faster than Objective-Cmatrix_mul_f32: xc is 325× faster than C++ (clang)matrix_mul_f32: xc is 322× faster than Swift
arm64: xc against each language, per benchmark (0.74)
arm64: xc against each language, per benchmark (0.75)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.22× slower than Objective-Cint_muldiv: xc is 1.22× slower than C++ (clang)int_muldiv: xc is 1.22× slower than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.22× slower than Objective-Cfloat_math: xc is 1.22× slower than C++ (clang)float_math: xc is 1.22× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.08× slower than Objective-Csort_small: xc is 1.04× slower than C++ (clang)sort_small: xc is 1.30× faster than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 2.1× faster than Objective-Cpoly_dispatch: xc is 1.05× faster than C++ (clang)poly_dispatch: xc is 3.8× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.43× faster than Objective-Cstruct_copy: xc is 1.43× faster than C++ (clang)struct_copy: xc is 1.45× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 9.7× faster than Objective-Carc_array: xc is 1.06× slower than C++ (clang)arc_array: xc is 1.60× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 1.37× faster than Objective-Carray_map: xc is 1.03× slower than C++ (clang)array_map: xc is 1.03× slower than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.68× faster than Objective-Cmem_copy: xc is 1.06× slower than C++ (clang)mem_copy: xc is 1.03× slower than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.01× faster than Objective-Cmatrix_mul: xc is 1.03× faster than C++ (clang)matrix_mul: xc is 4.9× faster than Swiftint_accumint_accum: the four programsint_accum: xc is 1.02× faster than Objective-Cint_accum: xc is 1.03× faster than C++ (clang)int_accum: xc is 1.03× faster than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.01× faster than Objective-Cbranch_mix: xc is 1.01× faster than C++ (clang)branch_mix: xc is 1.03× faster than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than Swiftbit_opsbit_ops: the four programsbit_ops: xc is 1.02× faster than Objective-Cbit_ops: xc is 1.01× faster than C++ (clang)bit_ops: xc is 1.02× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.06× faster than Objective-Ccall_depth: xc is 1.06× faster than C++ (clang)call_depth: xc is 1.06× faster than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.11× faster than Objective-Carray_sum: xc is 1.10× faster than C++ (clang)array_sum: xc is 1.11× faster than Swiftsievesieve: the four programssieve: xc is 1.37× faster than Objective-Csieve: xc is 1.37× faster than C++ (clang)sieve: xc is 1.85× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 2.6× faster than Objective-Cstring_scan: xc is 2.6× faster than C++ (clang)string_scan: xc is 2.6× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 330× faster than Objective-Cmatrix_mul_f32: xc is 329× faster than C++ (clang)matrix_mul_f32: xc is 325× faster than Swift
arm64: xc against each language, per benchmark (0.75)
arm64: xc against each language, per benchmark (0.8)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.22× slower than Objective-Cint_muldiv: xc is 1.24× slower than C++ (clang)int_muldiv: xc is 1.52× slower than C++ (GCC)int_muldiv: xc is 1.26× slower than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.19× slower than Objective-Cfloat_math: xc is 1.19× slower than C++ (clang)float_math: xc is 1.10× slower than C++ (GCC)float_math: xc is 1.19× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.07× slower than Objective-Csort_small: xc is 1.02× slower than C++ (clang)sort_small: xc is 1.01× faster than C++ (GCC)sort_small: xc is 1.32× faster than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 2.1× faster than Objective-Cpoly_dispatch: xc is 1.06× faster than C++ (clang)poly_dispatch: xc is 1.03× slower than C++ (GCC)poly_dispatch: xc is 3.9× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.42× faster than Objective-Cstruct_copy: xc is 1.43× faster than C++ (clang)struct_copy: xc is 1.06× slower than C++ (GCC)struct_copy: xc is 1.44× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 9.8× faster than Objective-Carc_array: xc is 1.03× slower than C++ (clang)arc_array: xc is 1.35× faster than C++ (GCC)arc_array: xc is 1.67× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 1.35× faster than Objective-Carray_map: xc is 1.08× slower than C++ (clang)array_map: xc is 3.9× faster than C++ (GCC)array_map: xc is 1.10× slower than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.65× faster than Objective-Cmem_copy: xc is 1.04× slower than C++ (clang)mem_copy: xc is 1.83× faster than C++ (GCC)mem_copy: xc is 1.01× slower than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.01× slower than Objective-Cmatrix_mul: xc is 1.01× faster than C++ (clang)matrix_mul: xc is 1.85× faster than C++ (GCC)matrix_mul: xc is 5.0× faster than Swiftint_accumint_accum: the four programsint_accum: xc is 1.01× faster than Objective-Cint_accum: xc is 1.01× faster than C++ (clang)int_accum: xc is 1.04× faster than C++ (GCC)int_accum: xc is 1.01× faster than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.02× faster than Objective-Cbranch_mix: xc is 1.03× faster than C++ (clang)branch_mix: xc is 1.03× faster than C++ (GCC)branch_mix: xc is 1.04× faster than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than C++ (GCC)hash_mix: xc is the same than Swiftbit_opsbit_ops: the four programsbit_ops: xc is 1.02× faster than Objective-Cbit_ops: xc is 1.03× faster than C++ (clang)bit_ops: xc is 1.02× faster than C++ (GCC)bit_ops: xc is 1.04× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.06× faster than Objective-Ccall_depth: xc is 1.07× faster than C++ (clang)call_depth: xc is 1.17× faster than C++ (GCC)call_depth: xc is 1.07× faster than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.10× faster than Objective-Carray_sum: xc is 1.10× faster than C++ (clang)array_sum: xc is 3.9× faster than C++ (GCC)array_sum: xc is 1.11× faster than Swiftsievesieve: the four programssieve: xc is 1.38× faster than Objective-Csieve: xc is 1.40× faster than C++ (clang)sieve: xc is 1.24× faster than C++ (GCC)sieve: xc is 1.89× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 2.5× faster than Objective-Cstring_scan: xc is 2.6× faster than C++ (clang)string_scan: xc is 1.52× faster than C++ (GCC)string_scan: xc is 2.6× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 322× faster than Objective-Cmatrix_mul_f32: xc is 323× faster than C++ (clang)matrix_mul_f32: xc is 322× faster than C++ (GCC)matrix_mul_f32: xc is 322× faster than Swift
arm64: xc against each language, per benchmark (0.8)
arm64: xc against each language, per benchmark (0.85)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.23× slower than Objective-Cint_muldiv: xc is 1.23× slower than C++ (clang)int_muldiv: xc is 1.50× slower than C++ (GCC)int_muldiv: xc is 1.23× slower than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.19× slower than Objective-Cfloat_math: xc is 1.19× slower than C++ (clang)float_math: xc is 1.10× slower than C++ (GCC)float_math: xc is 1.19× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.08× slower than Objective-Csort_small: xc is 1.04× slower than C++ (clang)sort_small: xc is 1.03× slower than C++ (GCC)sort_small: xc is 1.24× faster than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 2.1× faster than Objective-Cpoly_dispatch: xc is 1.05× faster than C++ (clang)poly_dispatch: xc is 1.07× slower than C++ (GCC)poly_dispatch: xc is 3.8× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.41× faster than Objective-Cstruct_copy: xc is 1.41× faster than C++ (clang)struct_copy: xc is 1.07× slower than C++ (GCC)struct_copy: xc is 1.43× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 9.6× faster than Objective-Carc_array: xc is 1.06× slower than C++ (clang)arc_array: xc is 1.36× faster than C++ (GCC)arc_array: xc is 1.60× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 1.33× faster than Objective-Carray_map: xc is 1.01× slower than C++ (clang)array_map: xc is 4.1× faster than C++ (GCC)array_map: xc is the same than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.64× faster than Objective-Cmem_copy: xc is 1.06× slower than C++ (clang)mem_copy: xc is 1.78× faster than C++ (GCC)mem_copy: xc is 1.04× slower than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.02× slower than Objective-Cmatrix_mul: xc is the same than C++ (clang)matrix_mul: xc is 1.82× faster than C++ (GCC)matrix_mul: xc is 4.9× faster than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is 1.04× faster than C++ (GCC)int_accum: xc is 1.01× faster than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.02× faster than Objective-Cbranch_mix: xc is 1.02× faster than C++ (clang)branch_mix: xc is 1.03× faster than C++ (GCC)branch_mix: xc is 1.04× faster than Swifthash_mixhash_mix: the four programshash_mix: xc is 1.01× slower than Objective-Chash_mix: xc is 1.01× slower than C++ (clang)hash_mix: xc is 1.01× slower than C++ (GCC)hash_mix: xc is 1.01× slower than Swiftbit_opsbit_ops: the four programsbit_ops: xc is 1.03× faster than Objective-Cbit_ops: xc is 1.03× faster than C++ (clang)bit_ops: xc is 1.04× faster than C++ (GCC)bit_ops: xc is 1.04× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.06× faster than Objective-Ccall_depth: xc is 1.06× faster than C++ (clang)call_depth: xc is 1.17× faster than C++ (GCC)call_depth: xc is 1.06× faster than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.10× faster than Objective-Carray_sum: xc is 1.10× faster than C++ (clang)array_sum: xc is 3.9× faster than C++ (GCC)array_sum: xc is 1.10× faster than Swiftsievesieve: the four programssieve: xc is 1.40× faster than Objective-Csieve: xc is 1.40× faster than C++ (clang)sieve: xc is 1.23× faster than C++ (GCC)sieve: xc is 1.90× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 2.5× faster than Objective-Cstring_scan: xc is 2.5× faster than C++ (clang)string_scan: xc is 1.47× faster than C++ (GCC)string_scan: xc is 2.5× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 352× faster than Objective-Cmatrix_mul_f32: xc is 352× faster than C++ (clang)matrix_mul_f32: xc is 352× faster than C++ (GCC)matrix_mul_f32: xc is 349× faster than Swift
arm64: xc against each language, per benchmark (0.85)
arm64: xc against each language, per benchmark (0.86)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.24× slower than Objective-Cint_muldiv: xc is 1.25× slower than C++ (clang)int_muldiv: xc is 1.52× slower than C++ (GCC)int_muldiv: xc is 1.25× slower than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.20× slower than Objective-Cfloat_math: xc is 1.20× slower than C++ (clang)float_math: xc is 1.11× slower than C++ (GCC)float_math: xc is 1.20× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.11× slower than Objective-Csort_small: xc is 1.07× slower than C++ (clang)sort_small: xc is 1.06× slower than C++ (GCC)sort_small: xc is 1.20× faster than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 2.1× faster than Objective-Cpoly_dispatch: xc is 1.02× faster than C++ (clang)poly_dispatch: xc is 1.10× slower than C++ (GCC)poly_dispatch: xc is 3.7× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.39× faster than Objective-Cstruct_copy: xc is 1.39× faster than C++ (clang)struct_copy: xc is 1.09× slower than C++ (GCC)struct_copy: xc is 1.42× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 9.6× faster than Objective-Carc_array: xc is 1.07× slower than C++ (clang)arc_array: xc is 1.35× faster than C++ (GCC)arc_array: xc is 1.59× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 1.26× faster than Objective-Carray_map: xc is 1.06× slower than C++ (clang)array_map: xc is 3.9× faster than C++ (GCC)array_map: xc is 1.05× slower than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.65× faster than Objective-Cmem_copy: xc is 1.06× slower than C++ (clang)mem_copy: xc is 1.80× faster than C++ (GCC)mem_copy: xc is 1.03× slower than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.02× slower than Objective-Cmatrix_mul: xc is the same than C++ (clang)matrix_mul: xc is 1.82× faster than C++ (GCC)matrix_mul: xc is 4.9× faster than Swiftint_accumint_accum: the four programsint_accum: xc is 1.01× slower than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is 1.03× faster than C++ (GCC)int_accum: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is 1.01× faster than C++ (GCC)branch_mix: xc is 1.01× faster than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than C++ (GCC)hash_mix: xc is the same than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is 1.01× faster than C++ (GCC)bit_ops: xc is 1.01× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.03× faster than Objective-Ccall_depth: xc is 1.04× faster than C++ (clang)call_depth: xc is 1.14× faster than C++ (GCC)call_depth: xc is 1.04× faster than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.08× faster than Objective-Carray_sum: xc is 1.08× faster than C++ (clang)array_sum: xc is 3.8× faster than C++ (GCC)array_sum: xc is 1.08× faster than Swiftsievesieve: the four programssieve: xc is 1.35× faster than Objective-Csieve: xc is 1.35× faster than C++ (clang)sieve: xc is 1.18× faster than C++ (GCC)sieve: xc is 1.82× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 2.5× faster than Objective-Cstring_scan: xc is 2.5× faster than C++ (clang)string_scan: xc is 1.45× faster than C++ (GCC)string_scan: xc is 2.5× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 352× faster than Objective-Cmatrix_mul_f32: xc is 352× faster than C++ (clang)matrix_mul_f32: xc is 352× faster than C++ (GCC)matrix_mul_f32: xc is 349× faster than Swift
arm64: xc against each language, per benchmark (0.86)
Release:
x86-64: xc against each language, per benchmark (0.62)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.19× slower than Objective-Carc_arrayarc_array: the four programsarc_array: xc is 3.2× faster than Objective-Csievesieve: the four programssieve: xc is 2.3× slower than Objective-Cstruct_copystruct_copy: the four programsstruct_copy: xc is 1.44× slower than Objective-Csort_smallsort_small: the four programssort_small: xc is 1.50× slower than Objective-Ccall_depthcall_depth: the four programscall_depth: xc is 1.11× slower than Objective-Carray_maparray_map: the four programsarray_map: xc is 1.35× slower than Objective-Cmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 2.0× slower than Objective-Cfloat_mathfloat_math: the four programsfloat_math: xc is 2.0× slower than Objective-Cpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.27× faster than Objective-Cmem_copymem_copy: the four programsmem_copy: xc is 1.46× slower than Objective-Cbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.01× slower than Objective-Cint_accumint_accum: the four programsint_accum: xc is the same than Objective-Chash_mixhash_mix: the four programshash_mix: xc is 1.10× faster than Objective-Carray_sumarray_sum: the four programsarray_sum: xc is 1.20× faster than Objective-Cstring_scanstring_scan: the four programsstring_scan: xc is 1.94× faster than Objective-Cmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 2.5× slower than Objective-Cmatrix_mul_f32: xc is 2.6× slower than C++ (clang)matrix_mul_f32: xc is 1.79× slower than Swift
x86-64: xc against each language, per benchmark (0.62)
x86-64: xc against each language, per benchmark (0.63)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.19× slower than Objective-Carc_arrayarc_array: the four programsarc_array: xc is 3.2× faster than Objective-Csievesieve: the four programssieve: xc is 2.3× slower than Objective-Cstruct_copystruct_copy: the four programsstruct_copy: xc is 1.44× slower than Objective-Csort_smallsort_small: the four programssort_small: xc is 1.25× slower than Objective-Ccall_depthcall_depth: the four programscall_depth: xc is 1.11× slower than Objective-Carray_maparray_map: the four programsarray_map: xc is 1.37× slower than Objective-Cmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 2.0× slower than Objective-Cfloat_mathfloat_math: the four programsfloat_math: xc is 2.0× slower than Objective-Cpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.27× faster than Objective-Cmem_copymem_copy: the four programsmem_copy: xc is 1.46× slower than Objective-Cbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.13× slower than Objective-Cint_accumint_accum: the four programsint_accum: xc is the same than Objective-Chash_mixhash_mix: the four programshash_mix: xc is 1.07× faster than Objective-Carray_sumarray_sum: the four programsarray_sum: xc is 1.19× faster than Objective-Cstring_scanstring_scan: the four programsstring_scan: xc is 1.94× faster than Objective-Cmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 2.4× slower than Objective-Cmatrix_mul_f32: xc is 2.4× slower than C++ (clang)matrix_mul_f32: xc is 1.70× slower than Swift
x86-64: xc against each language, per benchmark (0.63)
x86-64: xc against each language, per benchmark (0.64)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.19× slower than Objective-Carc_arrayarc_array: the four programsarc_array: xc is 3.2× faster than Objective-Csievesieve: the four programssieve: xc is 1.82× slower than Objective-Cstruct_copystruct_copy: the four programsstruct_copy: xc is 1.09× slower than Objective-Csort_smallsort_small: the four programssort_small: xc is 1.21× slower than Objective-Ccall_depthcall_depth: the four programscall_depth: xc is 1.11× slower than Objective-Carray_maparray_map: the four programsarray_map: xc is 1.01× faster than Objective-Cmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.08× slower than Objective-Cfloat_mathfloat_math: the four programsfloat_math: xc is 1.01× faster than Objective-Cpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.27× faster than Objective-Cmem_copymem_copy: the four programsmem_copy: xc is 1.02× slower than Objective-Cbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cint_accumint_accum: the four programsint_accum: xc is the same than Objective-Chash_mixhash_mix: the four programshash_mix: xc is 1.07× faster than Objective-Carray_sumarray_sum: the four programsarray_sum: xc is 1.55× faster than Objective-Cstring_scanstring_scan: the four programsstring_scan: xc is 1.95× faster than Objective-Cmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 1.98× slower than Objective-Cmatrix_mul_f32: xc is 2.00× slower than C++ (clang)matrix_mul_f32: xc is 1.40× slower than Swift
x86-64: xc against each language, per benchmark (0.64)
x86-64: xc against each language, per benchmark (0.65)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.19× slower than Objective-Cint_muldiv: xc is 1.19× slower than C++ (clang)int_muldiv: xc is 1.19× slower than Swiftarc_arrayarc_array: the four programsarc_array: xc is 3.2× faster than Objective-Carc_array: xc is 1.84× slower than C++ (clang)arc_array: xc is 1.92× slower than Swiftsievesieve: the four programssieve: xc is 1.49× slower than Objective-Csieve: xc is 1.48× slower than C++ (clang)sieve: xc is 1.01× slower than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.10× slower than Objective-Cstruct_copy: xc is 1.11× slower than C++ (clang)struct_copy: xc is 1.11× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.19× slower than Objective-Csort_small: xc is 1.22× slower than C++ (clang)sort_small: xc is 1.75× slower than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.11× slower than Objective-Ccall_depth: xc is 1.11× slower than C++ (clang)call_depth: xc is 1.09× slower than Swiftarray_maparray_map: the four programsarray_map: xc is 1.01× faster than Objective-Carray_map: xc is 1.06× slower than C++ (clang)array_map: xc is 1.32× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.10× faster than Objective-Cmatrix_mul: xc is 1.10× faster than C++ (clang)matrix_mul: xc is 3.6× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.05× slower than Objective-Cfloat_math: xc is 1.05× slower than C++ (clang)float_math: xc is 1.05× slower than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.28× faster than Objective-Cpoly_dispatch: xc is 1.04× slower than C++ (clang)poly_dispatch: xc is 6.9× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.02× slower than Objective-Cmem_copy: xc is 1.06× slower than C++ (clang)mem_copy: xc is 1.12× slower than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is the same than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is 1.08× faster than Objective-Chash_mix: xc is 1.07× faster than C++ (clang)hash_mix: xc is 1.06× faster than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.58× faster than Objective-Carray_sum: xc is 1.19× faster than C++ (clang)array_sum: xc is 1.19× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 1.94× faster than Objective-Cstring_scan: xc is 1.95× faster than C++ (clang)string_scan: xc is 1.95× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 1.76× slower than Objective-Cmatrix_mul_f32: xc is 1.78× slower than C++ (clang)matrix_mul_f32: xc is 1.24× slower than Swift
x86-64: xc against each language, per benchmark (0.65)
x86-64: xc against each language, per benchmark (0.66)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.67× faster than Objective-Cint_muldiv: xc is 1.66× faster than C++ (clang)int_muldiv: xc is 1.67× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 3.0× faster than Objective-Carc_array: xc is 1.94× slower than C++ (clang)arc_array: xc is 2.0× slower than Swiftsievesieve: the four programssieve: xc is 1.67× slower than Objective-Csieve: xc is 1.69× slower than C++ (clang)sieve: xc is 1.13× slower than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.09× slower than Objective-Cstruct_copy: xc is 1.09× slower than C++ (clang)struct_copy: xc is 1.09× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.14× slower than Objective-Csort_small: xc is 1.14× slower than C++ (clang)sort_small: xc is 1.67× slower than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.57× slower than Objective-Ccall_depth: xc is 1.57× slower than C++ (clang)call_depth: xc is 1.54× slower than Swiftarray_maparray_map: the four programsarray_map: xc is 2.0× faster than Objective-Carray_map: xc is 1.91× faster than C++ (clang)array_map: xc is 2.7× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.10× faster than Objective-Cmatrix_mul: xc is 1.10× faster than C++ (clang)matrix_mul: xc is 3.6× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.02× slower than Objective-Cfloat_math: xc is 1.02× slower than C++ (clang)float_math: xc is 1.02× slower than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.27× faster than Objective-Cpoly_dispatch: xc is 1.04× slower than C++ (clang)poly_dispatch: xc is 6.9× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.52× faster than Objective-Cmem_copy: xc is 1.47× faster than C++ (clang)mem_copy: xc is 1.40× faster than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is the same than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is 1.06× faster than Objective-Chash_mix: xc is 1.06× faster than C++ (clang)hash_mix: xc is 1.06× faster than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 2.9× faster than Objective-Carray_sum: xc is 2.2× faster than C++ (clang)array_sum: xc is 2.2× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 1.94× faster than Objective-Cstring_scan: xc is 1.95× faster than C++ (clang)string_scan: xc is 1.95× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 1.53× slower than Objective-Cmatrix_mul_f32: xc is 1.54× slower than C++ (clang)matrix_mul_f32: xc is 1.08× slower than Swift
x86-64: xc against each language, per benchmark (0.66)
x86-64: xc against each language, per benchmark (0.7)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.69× faster than Objective-Cint_muldiv: xc is 1.69× faster than C++ (clang)int_muldiv: xc is 1.69× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 3.0× faster than Objective-Carc_array: xc is 1.89× slower than C++ (clang)arc_array: xc is 2.0× slower than Swiftsievesieve: the four programssieve: xc is 1.63× slower than Objective-Csieve: xc is 1.65× slower than C++ (clang)sieve: xc is 1.12× slower than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.09× slower than Objective-Cstruct_copy: xc is 1.09× slower than C++ (clang)struct_copy: xc is 1.09× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.19× slower than Objective-Csort_small: xc is 1.19× slower than C++ (clang)sort_small: xc is 1.72× slower than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.83× faster than Objective-Ccall_depth: xc is 1.83× faster than C++ (clang)call_depth: xc is 1.87× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 2.0× faster than Objective-Carray_map: xc is 1.91× faster than C++ (clang)array_map: xc is 2.7× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.10× faster than Objective-Cmatrix_mul: xc is 1.10× faster than C++ (clang)matrix_mul: xc is 3.6× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.02× slower than Objective-Cfloat_math: xc is 1.01× slower than C++ (clang)float_math: xc is 1.02× slower than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.27× faster than Objective-Cpoly_dispatch: xc is 1.04× slower than C++ (clang)poly_dispatch: xc is 6.9× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.87× faster than Objective-Cmem_copy: xc is 1.81× faster than C++ (clang)mem_copy: xc is 1.73× faster than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is the same than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is 1.06× faster than Objective-Chash_mix: xc is 1.06× faster than C++ (clang)hash_mix: xc is 1.06× faster than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 3.1× faster than Objective-Carray_sum: xc is 2.3× faster than C++ (clang)array_sum: xc is 2.3× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 1.95× faster than Objective-Cstring_scan: xc is 1.96× faster than C++ (clang)string_scan: xc is 1.95× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 1.56× slower than Objective-Cmatrix_mul_f32: xc is 1.57× slower than C++ (clang)matrix_mul_f32: xc is 1.10× slower than Swift
x86-64: xc against each language, per benchmark (0.7)
x86-64: xc against each language, per benchmark (0.71)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 3.3× faster than Objective-Cint_muldiv: xc is 3.3× faster than C++ (clang)int_muldiv: xc is 3.3× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 3.0× faster than Objective-Carc_array: xc is 1.84× slower than C++ (clang)arc_array: xc is 2.0× slower than Swiftsievesieve: the four programssieve: xc is 1.45× slower than Objective-Csieve: xc is 1.51× slower than C++ (clang)sieve: xc is 1.02× slower than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.11× slower than Objective-Cstruct_copy: xc is 1.11× slower than C++ (clang)struct_copy: xc is 1.11× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.24× slower than Objective-Csort_small: xc is 1.24× slower than C++ (clang)sort_small: xc is 1.81× slower than Swiftcall_depthcall_depth: the four programscall_depth: xc is 3.6× faster than Objective-Ccall_depth: xc is 3.6× faster than C++ (clang)call_depth: xc is 3.7× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 3.7× faster than Objective-Carray_map: xc is 3.4× faster than C++ (clang)array_map: xc is 4.8× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.10× faster than Objective-Cmatrix_mul: xc is 1.10× faster than C++ (clang)matrix_mul: xc is 3.6× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.05× slower than Objective-Cfloat_math: xc is 1.05× slower than C++ (clang)float_math: xc is 1.06× slower than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.28× faster than Objective-Cpoly_dispatch: xc is 1.04× slower than C++ (clang)poly_dispatch: xc is 6.9× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is 2.8× faster than Objective-Cmem_copy: xc is 2.7× faster than C++ (clang)mem_copy: xc is 2.6× faster than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is the same than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is 1.06× faster than Objective-Chash_mix: xc is 1.06× faster than C++ (clang)hash_mix: xc is 1.06× faster than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 4.3× faster than Objective-Carray_sum: xc is 3.3× faster than C++ (clang)array_sum: xc is 3.3× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 1.94× faster than Objective-Cstring_scan: xc is 1.95× faster than C++ (clang)string_scan: xc is 1.95× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 22× faster than Objective-Cmatrix_mul_f32: xc is 22× faster than C++ (clang)matrix_mul_f32: xc is 31× faster than Swift
x86-64: xc against each language, per benchmark (0.71)
x86-64: xc against each language, per benchmark (0.72)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 3.3× faster than Objective-Cint_muldiv: xc is 3.3× faster than C++ (clang)int_muldiv: xc is 3.3× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 3.2× faster than Objective-Carc_array: xc is 1.78× slower than C++ (clang)arc_array: xc is 1.90× slower than Swiftsievesieve: the four programssieve: xc is 1.71× slower than Objective-Csieve: xc is 1.71× slower than C++ (clang)sieve: xc is 1.14× slower than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.11× slower than Objective-Cstruct_copy: xc is 1.11× slower than C++ (clang)struct_copy: xc is 1.11× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.23× slower than Objective-Csort_small: xc is 1.23× slower than C++ (clang)sort_small: xc is 1.79× slower than Swiftcall_depthcall_depth: the four programscall_depth: xc is 3.6× faster than Objective-Ccall_depth: xc is 3.6× faster than C++ (clang)call_depth: xc is 3.7× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 3.6× faster than Objective-Carray_map: xc is 3.4× faster than C++ (clang)array_map: xc is 4.8× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.10× faster than Objective-Cmatrix_mul: xc is 1.10× faster than C++ (clang)matrix_mul: xc is 3.6× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.05× slower than Objective-Cfloat_math: xc is 1.05× slower than C++ (clang)float_math: xc is 1.06× slower than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.27× faster than Objective-Cpoly_dispatch: xc is 1.04× slower than C++ (clang)poly_dispatch: xc is 6.9× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is 3.0× faster than Objective-Cmem_copy: xc is 2.9× faster than C++ (clang)mem_copy: xc is 2.7× faster than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is the same than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is 1.06× faster than Objective-Chash_mix: xc is 1.06× faster than C++ (clang)hash_mix: xc is 1.06× faster than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 3.8× faster than Objective-Carray_sum: xc is 2.9× faster than C++ (clang)array_sum: xc is 2.9× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 1.94× faster than Objective-Cstring_scan: xc is 1.95× faster than C++ (clang)string_scan: xc is 1.95× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 28× faster than Objective-Cmatrix_mul_f32: xc is 28× faster than C++ (clang)matrix_mul_f32: xc is 40× faster than Swift
x86-64: xc against each language, per benchmark (0.72)
x86-64: xc against each language, per benchmark (0.73)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 3.3× faster than Objective-Cint_muldiv: xc is 3.3× faster than C++ (clang)int_muldiv: xc is 3.3× faster than Swiftarc_arrayarc_array: the four programsarc_array: xc is 3.2× faster than Objective-Carc_array: xc is 1.79× slower than C++ (clang)arc_array: xc is 1.88× slower than Swiftsievesieve: the four programssieve: xc is 1.35× slower than Objective-Csieve: xc is 1.32× slower than C++ (clang)sieve: xc is 1.09× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.11× slower than Objective-Cstruct_copy: xc is 1.11× slower than C++ (clang)struct_copy: xc is 1.11× slower than Swiftsort_smallsort_small: the four programssort_small: xc is 1.27× slower than Objective-Csort_small: xc is 1.28× slower than C++ (clang)sort_small: xc is 1.86× slower than Swiftcall_depthcall_depth: the four programscall_depth: xc is 3.6× faster than Objective-Ccall_depth: xc is 3.6× faster than C++ (clang)call_depth: xc is 3.7× faster than Swiftarray_maparray_map: the four programsarray_map: xc is 3.7× faster than Objective-Carray_map: xc is 3.4× faster than C++ (clang)array_map: xc is 4.9× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.02× slower than Objective-Cmatrix_mul: xc is 1.02× slower than C++ (clang)matrix_mul: xc is 3.2× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.02× slower than Objective-Cfloat_math: xc is 1.01× slower than C++ (clang)float_math: xc is 1.02× slower than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.27× faster than Objective-Cpoly_dispatch: xc is 1.04× slower than C++ (clang)poly_dispatch: xc is 6.9× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is 3.0× faster than Objective-Cmem_copy: xc is 2.9× faster than C++ (clang)mem_copy: xc is 2.7× faster than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.01× slower than Objective-Cbranch_mix: xc is 1.01× slower than C++ (clang)branch_mix: xc is the same than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is 1.06× faster than Objective-Chash_mix: xc is 1.06× faster than C++ (clang)hash_mix: xc is 1.06× faster than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 6.0× faster than Objective-Carray_sum: xc is 4.5× faster than C++ (clang)array_sum: xc is 4.5× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 1.94× faster than Objective-Cstring_scan: xc is 1.95× faster than C++ (clang)string_scan: xc is 1.95× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 27× faster than Objective-Cmatrix_mul_f32: xc is 27× faster than C++ (clang)matrix_mul_f32: xc is 40× faster than Swift
x86-64: xc against each language, per benchmark (0.73)
x86-64: xc against each language, per benchmark (0.74)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.52× slower than Objective-Cint_muldiv: xc is 1.51× slower than C++ (clang)int_muldiv: xc is 2.9× slower than C++ (GCC)int_muldiv: xc is 1.51× slower than Swiftarc_arrayarc_array: the four programsarc_array: xc is 3.4× faster than Objective-Carc_array: xc is 1.43× slower than C++ (clang)arc_array: xc is 1.74× slower than C++ (GCC)arc_array: xc is 1.96× slower than Swiftsievesieve: the four programssieve: xc is 1.45× slower than Objective-Csieve: xc is 1.46× slower than C++ (clang)sieve: xc is 1.32× slower than C++ (GCC)sieve: xc is 1.05× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is the same than Objective-Cstruct_copy: xc is the same than C++ (clang)struct_copy: xc is 1.34× slower than C++ (GCC)struct_copy: xc is the same than Swiftsort_smallsort_small: the four programssort_small: xc is 2.6× slower than Objective-Csort_small: xc is 2.6× slower than C++ (clang)sort_small: xc is 2.3× slower than C++ (GCC)sort_small: xc is 1.66× slower than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.39× slower than Objective-Ccall_depth: xc is 1.39× slower than C++ (clang)call_depth: xc is 1.10× slower than C++ (GCC)call_depth: xc is 1.40× slower than Swiftarray_maparray_map: the four programsarray_map: xc is 1.57× slower than Objective-Carray_map: xc is 1.59× slower than C++ (clang)array_map: xc is 4.8× faster than C++ (GCC)array_map: xc is 1.21× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 8.2× slower than Objective-Cmatrix_mul: xc is 4.8× slower than C++ (clang)matrix_mul: xc is 8.0× slower than C++ (GCC)matrix_mul: xc is 3.0× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.02× slower than Objective-Cfloat_math: xc is 1.01× slower than C++ (clang)float_math: xc is 1.12× slower than C++ (GCC)float_math: xc is 1.02× slower than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.27× faster than Objective-Cpoly_dispatch: xc is 1.04× slower than C++ (clang)poly_dispatch: xc is 1.04× slower than C++ (GCC)poly_dispatch: xc is 6.9× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.48× faster than Objective-Cmem_copy: xc is 1.01× slower than C++ (clang)mem_copy: xc is 1.08× faster than C++ (GCC)mem_copy: xc is 1.55× faster than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is the same than C++ (GCC)bit_ops: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is 1.01× slower than Objective-Cbranch_mix: xc is 1.01× slower than C++ (clang)branch_mix: xc is the same than C++ (GCC)branch_mix: xc is the same than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is the same than C++ (GCC)int_accum: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than C++ (GCC)hash_mix: xc is the same than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.07× slower than Objective-Carray_sum: xc is 1.51× faster than C++ (clang)array_sum: xc is 3.0× faster than C++ (GCC)array_sum: xc is 1.08× slower than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 3.0× slower than Objective-Cstring_scan: xc is 2.9× slower than C++ (clang)string_scan: xc is 1.92× slower than C++ (GCC)string_scan: xc is 3.0× slower than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 37× faster than Objective-Cmatrix_mul_f32: xc is 37× faster than C++ (clang)matrix_mul_f32: xc is 3.7× faster than C++ (GCC)matrix_mul_f32: xc is 38× faster than Swift
x86-64: xc against each language, per benchmark (0.74)
x86-64: xc against each language, per benchmark (0.75)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.51× slower than Objective-Cint_muldiv: xc is 1.51× slower than C++ (clang)int_muldiv: xc is 3.0× slower than C++ (GCC)int_muldiv: xc is 1.51× slower than Swiftarc_arrayarc_array: the four programsarc_array: xc is 3.2× faster than Objective-Carc_array: xc is 1.51× slower than C++ (clang)arc_array: xc is 1.85× slower than C++ (GCC)arc_array: xc is 2.1× slower than Swiftsievesieve: the four programssieve: xc is 1.30× slower than Objective-Csieve: xc is 1.29× slower than C++ (clang)sieve: xc is 1.19× slower than C++ (GCC)sieve: xc is 1.18× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.02× faster than Objective-Cstruct_copy: xc is 1.02× faster than C++ (clang)struct_copy: xc is 1.32× slower than C++ (GCC)struct_copy: xc is 1.02× faster than Swiftsort_smallsort_small: the four programssort_small: xc is 1.30× slower than Objective-Csort_small: xc is 1.30× slower than C++ (clang)sort_small: xc is 1.13× slower than C++ (GCC)sort_small: xc is 1.19× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.40× slower than Objective-Ccall_depth: xc is 1.39× slower than C++ (clang)call_depth: xc is 1.10× slower than C++ (GCC)call_depth: xc is 1.39× slower than Swiftarray_maparray_map: the four programsarray_map: xc is 1.22× slower than Objective-Carray_map: xc is 1.58× faster than C++ (clang)array_map: xc is 6.2× faster than C++ (GCC)array_map: xc is 1.58× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.61× slower than Objective-Cmatrix_mul: xc is 1.61× slower than C++ (clang)matrix_mul: xc is 1.56× slower than C++ (GCC)matrix_mul: xc is 15.4× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.03× slower than Objective-Cfloat_math: xc is 1.03× slower than C++ (clang)float_math: xc is 1.13× slower than C++ (GCC)float_math: xc is 1.03× slower than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.28× faster than Objective-Cpoly_dispatch: xc is 1.04× slower than C++ (clang)poly_dispatch: xc is 1.04× slower than C++ (GCC)poly_dispatch: xc is 6.9× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is the same than Objective-Cmem_copy: xc is 1.50× faster than C++ (clang)mem_copy: xc is 1.10× faster than C++ (GCC)mem_copy: xc is 1.57× faster than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is the same than C++ (GCC)bit_ops: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is the same than C++ (GCC)branch_mix: xc is the same than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is the same than C++ (GCC)int_accum: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than C++ (GCC)hash_mix: xc is the same than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.65× slower than Objective-Carray_sum: xc is 1.02× slower than C++ (clang)array_sum: xc is 1.95× faster than C++ (GCC)array_sum: xc is 1.65× slower than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 1.16× faster than Objective-Cstring_scan: xc is 1.16× faster than C++ (clang)string_scan: xc is 1.78× faster than C++ (GCC)string_scan: xc is 1.15× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 36× faster than Objective-Cmatrix_mul_f32: xc is 36× faster than C++ (clang)matrix_mul_f32: xc is 3.6× faster than C++ (GCC)matrix_mul_f32: xc is 35× faster than Swift
x86-64: xc against each language, per benchmark (0.75)
x86-64: xc against each language, per benchmark (0.8)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.51× slower than Objective-Cint_muldiv: xc is 1.51× slower than C++ (clang)int_muldiv: xc is 3.0× slower than C++ (GCC)int_muldiv: xc is 1.51× slower than Swiftarc_arrayarc_array: the four programsarc_array: xc is 3.2× faster than Objective-Carc_array: xc is 1.50× slower than C++ (clang)arc_array: xc is 1.84× slower than C++ (GCC)arc_array: xc is 2.1× slower than Swiftsievesieve: the four programssieve: xc is 1.31× slower than Objective-Csieve: xc is 1.32× slower than C++ (clang)sieve: xc is 1.19× slower than C++ (GCC)sieve: xc is 1.18× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.02× faster than Objective-Cstruct_copy: xc is 1.02× faster than C++ (clang)struct_copy: xc is 1.32× slower than C++ (GCC)struct_copy: xc is 1.02× faster than Swiftsort_smallsort_small: the four programssort_small: xc is 1.28× slower than Objective-Csort_small: xc is 1.28× slower than C++ (clang)sort_small: xc is 1.11× slower than C++ (GCC)sort_small: xc is 1.22× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.40× slower than Objective-Ccall_depth: xc is 1.40× slower than C++ (clang)call_depth: xc is 1.10× slower than C++ (GCC)call_depth: xc is 1.39× slower than Swiftarray_maparray_map: the four programsarray_map: xc is 1.20× slower than Objective-Carray_map: xc is 1.22× slower than C++ (clang)array_map: xc is 6.2× faster than C++ (GCC)array_map: xc is 1.58× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.50× faster than Objective-Cmatrix_mul: xc is 1.16× slower than C++ (clang)matrix_mul: xc is 1.13× slower than C++ (GCC)matrix_mul: xc is 21× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.03× slower than Objective-Cfloat_math: xc is 1.04× slower than C++ (clang)float_math: xc is 1.13× slower than C++ (GCC)float_math: xc is 1.03× slower than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.28× faster than Objective-Cpoly_dispatch: xc is 1.04× slower than C++ (clang)poly_dispatch: xc is 1.04× slower than C++ (GCC)poly_dispatch: xc is 6.9× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is 1.51× faster than Objective-Cmem_copy: xc is the same than C++ (clang)mem_copy: xc is 1.10× faster than C++ (GCC)mem_copy: xc is 1.57× faster than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is the same than C++ (GCC)bit_ops: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is the same than C++ (GCC)branch_mix: xc is the same than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is the same than C++ (GCC)int_accum: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than C++ (GCC)hash_mix: xc is the same than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.65× slower than Objective-Carray_sum: xc is 1.66× slower than C++ (clang)array_sum: xc is 1.95× faster than C++ (GCC)array_sum: xc is 1.66× slower than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 1.15× faster than Objective-Cstring_scan: xc is 1.16× faster than C++ (clang)string_scan: xc is 1.78× faster than C++ (GCC)string_scan: xc is 1.15× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 37× faster than Objective-Cmatrix_mul_f32: xc is 37× faster than C++ (clang)matrix_mul_f32: xc is 3.6× faster than C++ (GCC)matrix_mul_f32: xc is 36× faster than Swift
x86-64: xc against each language, per benchmark (0.8)
x86-64: xc against each language, per benchmark (0.85)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.50× slower than Objective-Cint_muldiv: xc is 1.51× slower than C++ (clang)int_muldiv: xc is 2.9× slower than C++ (GCC)int_muldiv: xc is 1.51× slower than Swiftarc_arrayarc_array: the four programsarc_array: xc is 3.3× faster than Objective-Carc_array: xc is 1.48× slower than C++ (clang)arc_array: xc is 1.81× slower than C++ (GCC)arc_array: xc is 2.0× slower than Swiftsievesieve: the four programssieve: xc is 1.36× slower than Objective-Csieve: xc is 1.37× slower than C++ (clang)sieve: xc is 1.24× slower than C++ (GCC)sieve: xc is 1.14× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.02× faster than Objective-Cstruct_copy: xc is 1.02× faster than C++ (clang)struct_copy: xc is 1.32× slower than C++ (GCC)struct_copy: xc is 1.02× faster than Swiftsort_smallsort_small: the four programssort_small: xc is 1.28× slower than Objective-Csort_small: xc is 1.27× slower than C++ (clang)sort_small: xc is 1.12× slower than C++ (GCC)sort_small: xc is 1.21× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.28× slower than Objective-Ccall_depth: xc is 1.28× slower than C++ (clang)call_depth: xc is 1.01× slower than C++ (GCC)call_depth: xc is 1.27× slower than Swiftarray_maparray_map: the four programsarray_map: xc is 1.61× faster than Objective-Carray_map: xc is 1.22× slower than C++ (clang)array_map: xc is 6.2× faster than C++ (GCC)array_map: xc is 1.58× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.44× faster than Objective-Cmatrix_mul: xc is 1.19× slower than C++ (clang)matrix_mul: xc is 1.15× slower than C++ (GCC)matrix_mul: xc is 21× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is 1.01× faster than Objective-Cfloat_math: xc is the same than C++ (clang)float_math: xc is 1.10× slower than C++ (GCC)float_math: xc is the same than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.28× faster than Objective-Cpoly_dispatch: xc is 1.04× slower than C++ (clang)poly_dispatch: xc is 1.04× slower than C++ (GCC)poly_dispatch: xc is 6.9× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is the same than Objective-Cmem_copy: xc is the same than C++ (clang)mem_copy: xc is 1.11× faster than C++ (GCC)mem_copy: xc is 1.58× faster than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is the same than C++ (GCC)bit_ops: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is the same than C++ (GCC)branch_mix: xc is the same than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is the same than C++ (GCC)int_accum: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than C++ (GCC)hash_mix: xc is the same than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.10× faster than Objective-Carray_sum: xc is 1.09× faster than C++ (clang)array_sum: xc is 3.5× faster than C++ (GCC)array_sum: xc is 1.08× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 1.15× faster than Objective-Cstring_scan: xc is 1.16× faster than C++ (clang)string_scan: xc is 1.79× faster than C++ (GCC)string_scan: xc is 1.15× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 36× faster than Objective-Cmatrix_mul_f32: xc is 36× faster than C++ (clang)matrix_mul_f32: xc is 3.6× faster than C++ (GCC)matrix_mul_f32: xc is 35× faster than Swift
x86-64: xc against each language, per benchmark (0.85)
x86-64: xc against each language, per benchmark (0.86)xc vs Objective-Cxc vs C++ (clang)xc vs C++ (GCC)xc vs Swift8× faster4× faster2× fastersame2× slower4× slower8× slower← xc fasterxc slower →int_muldivint_muldiv: the four programsint_muldiv: xc is 1.50× slower than Objective-Cint_muldiv: xc is 1.50× slower than C++ (clang)int_muldiv: xc is 2.9× slower than C++ (GCC)int_muldiv: xc is 1.50× slower than Swiftarc_arrayarc_array: the four programsarc_array: xc is 3.3× faster than Objective-Carc_array: xc is 1.46× slower than C++ (clang)arc_array: xc is 1.79× slower than C++ (GCC)arc_array: xc is 2.0× slower than Swiftsievesieve: the four programssieve: xc is 1.36× slower than Objective-Csieve: xc is 1.37× slower than C++ (clang)sieve: xc is 1.24× slower than C++ (GCC)sieve: xc is 1.14× faster than Swiftstruct_copystruct_copy: the four programsstruct_copy: xc is 1.01× faster than Objective-Cstruct_copy: xc is 1.01× faster than C++ (clang)struct_copy: xc is 1.32× slower than C++ (GCC)struct_copy: xc is 1.01× faster than Swiftsort_smallsort_small: the four programssort_small: xc is 1.29× slower than Objective-Csort_small: xc is 1.28× slower than C++ (clang)sort_small: xc is 1.13× slower than C++ (GCC)sort_small: xc is 1.20× faster than Swiftcall_depthcall_depth: the four programscall_depth: xc is 1.28× slower than Objective-Ccall_depth: xc is 1.28× slower than C++ (clang)call_depth: xc is 1.01× slower than C++ (GCC)call_depth: xc is 1.28× slower than Swiftarray_maparray_map: the four programsarray_map: xc is 1.61× faster than Objective-Carray_map: xc is 1.22× slower than C++ (clang)array_map: xc is 6.2× faster than C++ (GCC)array_map: xc is 1.58× faster than Swiftmatrix_mulmatrix_mul: the four programsmatrix_mul: xc is 1.44× faster than Objective-Cmatrix_mul: xc is 1.19× slower than C++ (clang)matrix_mul: xc is 1.16× slower than C++ (GCC)matrix_mul: xc is 21× faster than Swiftfloat_mathfloat_math: the four programsfloat_math: xc is the same than Objective-Cfloat_math: xc is the same than C++ (clang)float_math: xc is 1.10× slower than C++ (GCC)float_math: xc is the same than Swiftpoly_dispatchpoly_dispatch: the four programspoly_dispatch: xc is 1.28× faster than Objective-Cpoly_dispatch: xc is 1.04× slower than C++ (clang)poly_dispatch: xc is 1.04× slower than C++ (GCC)poly_dispatch: xc is 6.9× faster than Swiftmem_copymem_copy: the four programsmem_copy: xc is the same than Objective-Cmem_copy: xc is the same than C++ (clang)mem_copy: xc is 1.10× faster than C++ (GCC)mem_copy: xc is 1.58× faster than Swiftbit_opsbit_ops: the four programsbit_ops: xc is the same than Objective-Cbit_ops: xc is the same than C++ (clang)bit_ops: xc is the same than C++ (GCC)bit_ops: xc is the same than Swiftbranch_mixbranch_mix: the four programsbranch_mix: xc is the same than Objective-Cbranch_mix: xc is the same than C++ (clang)branch_mix: xc is the same than C++ (GCC)branch_mix: xc is the same than Swiftint_accumint_accum: the four programsint_accum: xc is the same than Objective-Cint_accum: xc is the same than C++ (clang)int_accum: xc is the same than C++ (GCC)int_accum: xc is the same than Swifthash_mixhash_mix: the four programshash_mix: xc is the same than Objective-Chash_mix: xc is the same than C++ (clang)hash_mix: xc is the same than C++ (GCC)hash_mix: xc is the same than Swiftarray_sumarray_sum: the four programsarray_sum: xc is 1.12× faster than Objective-Carray_sum: xc is 1.11× faster than C++ (clang)array_sum: xc is 3.6× faster than C++ (GCC)array_sum: xc is 1.10× faster than Swiftstring_scanstring_scan: the four programsstring_scan: xc is 1.16× faster than Objective-Cstring_scan: xc is 1.17× faster than C++ (clang)string_scan: xc is 1.79× faster than C++ (GCC)string_scan: xc is 1.16× faster than Swiftmatrix_mul_f32matrix_mul_f32: the four programsmatrix_mul_f32: xc is 36× faster than Objective-Cmatrix_mul_f32: xc is 36× faster than C++ (clang)matrix_mul_f32: xc is 3.7× faster than C++ (GCC)matrix_mul_f32: xc is 35× faster than Swift
x86-64: xc against each language, per benchmark (0.86)
benchmarkxcObjective-CC++ (clang)C++ (GCC)Swiftxc vs the fastest of the others
method_call0.882.311.100.181.074.9× slower
int_muldiv1.180.950.950.780.951.52× slower
float_math0.970.810.810.880.811.20× slower
sort_small1.060.960.991.001.281.11× slower
poly_dispatch0.551.130.560.492.041.10× slower
struct_copy0.710.991.000.661.011.09× slower
arc_array0.555.250.510.740.881.07× slower
array_map1.171.471.104.591.111.06× slower
mem_copy0.941.560.901.700.911.06× slower
arc_alloc1.011.460.981.022.211.03× slower
matrix_mul0.230.220.230.421.121.02× slower
int_accum1.111.101.111.151.111.01× slower
branch_mix1.001.001.001.021.02the same
hash_mix1.141.141.141.141.14the same
bit_ops1.181.181.181.191.18the same
call_depth0.960.991.001.101.001.03× faster
array_sum0.830.900.903.200.901.08× faster
sieve1.091.471.481.291.991.18× faster
string_scan0.962.362.391.392.361.45× faster
matrix_mul_f320.039.679.689.689.58349× faster
benchmarkxcObjective-CC++ (clang)C++ (GCC)Swiftxc vs the fastest of the others
int_muldiv0.500.340.340.170.342.9× slower
arc_array1.133.720.770.630.562.0× slower
sieve1.020.750.740.821.161.37× slower
struct_copy0.860.870.870.650.871.32× slower
sort_small0.920.720.720.821.111.29× slower
call_depth0.240.190.190.240.191.28× slower
array_map0.320.520.272.020.511.22× slower
matrix_mul0.090.130.080.081.881.19× slower
float_math0.740.740.730.670.731.10× slower
poly_dispatch0.971.230.930.936.671.04× slower
mem_copy0.350.340.340.380.54the same
bit_ops0.970.970.970.970.97the same
branch_mix0.810.810.810.810.81the same
int_accum0.970.970.970.970.97the same
hash_mix1.011.011.011.011.01the same
arc_alloc0.402.210.440.440.741.09× faster
array_sum0.200.220.220.710.221.10× faster
string_scan0.470.540.550.840.541.16× faster
method_call1.311.901.581.591.811.21× faster
matrix_mul_f320.238.368.280.848.013.7× faster

The fastest results are where the runtime does the work: string_scan, method_call and struct_copy are byte scanning, dynamic dispatch and aggregate copies. The slowest show where xcc’s code generation has most to gain:

  • Vectorisation. On arm64, int_muldiv and float_math are vectorised by both compilers, and clang’s loops are tighter; matrix_mul has matched clang there since 0.73. On x86-64 matrix_mul is still behind, because clang keeps the second matrix’s rows in registers across the outer loop.
  • Reference counting on x86-64. arc_array, where C++ reads elements without retaining them.
  • x86-64 loops and calls. sieve and sort_small, where clang’s loops are still tighter (in 0.74 sort_small was 2.6× behind; 0.75 rotates its inner loop), call_depth, where clang’s call sequence is shorter, and int_muldiv, where GCC hoists the arithmetic that does not depend on the repetition out of it.

A dense matrix multiply written as three plain loops, C[i][j] the sum over k of A[i][k] · B[k][j] in float or double, runs as a kernel the compiler writes itself (from 0.71). The results are the loops’, to the last bit, and -fno-matmul turns it off. The kernel depends on the machine:

  • Apple M4 and later (SME): the multiply runs on the matrix unit. From 0.72 it works on a 2×2 block of the unit’s tiles at once, and under :goal(speed), which matrix_mul_f32 uses, it leaves out a NaN check that only affects the bits of a NaN (the inputs have none).
  • x86-64: the widest vector unit the processor has (SSE2, AVX2 or AVX-512), chosen when the program starts; the Ryzen 9 9955HX picks AVX-512.

matrix_mul_f32 measures it: a 128×128 float multiply, 10,000 times. (matrix_mul multiplies u32 values, which the matrix unit does not take, so it stays a vectorised loop.)

matrix_mul_f32xcObjective-CC++ (clang)C++ (GCC)Swift
arm64, Apple M4 Max27 ms9.7 s9.7 s9.7 s9.6 s
xc is352× faster352× faster352× faster349× faster
x86-64, AMD Ryzen 9 9955HX229 ms8.4 s8.3 s837 ms8.0 s
xc is36× faster36× faster3.7× faster35× faster

par blocks, which run on every CPU thread, on GPUs and across machines, have pages of their own: Performance: GPU (including plain loops made parallel by --par-auto) and Performance: networked.

How fast xc’s code is in each release, relative to 0.62: above 1× is faster. The thin lines are single benchmarks (labelled where they moved by more than twelve percent), the thick line the geometric mean (without matrix_mul_f32). Releases shown: 0.62, 0.63, 0.64, 0.65, 0.66, 0.7, 0.71, 0.72, 0.73, 0.74, 0.75, 0.8, 0.85, 0.86. arc_alloc, method_call changed in 0.64’s benchmark set and are left out of this history.

arm64: xc's speed relative to 0.620.80×0.90×1.00×1.10×1.25×1.50×2.00×3.00×0.620.630.640.650.660.70.710.720.730.740.750.80.850.86arc_array: 1.00, 1.00, 1.03, 1.86, 1.85, 1.77, 1.79, 1.83, 1.83, 1.85, 1.79, 1.87, 1.81, 1.80array_map: 1.00, 1.02, 1.15, 1.59, 1.62, 1.61, 1.52, 1.63, 1.50, 1.61, 1.48, 1.43, 1.52, 1.44array_sum: 1.00, 1.01, 1.02, 1.04, 1.03, 1.01, 1.02, 1.03, 1.17, 1.18, 1.14, 1.16, 1.17, 1.15bit_ops: 1.00, 1.01, 1.03, 1.27, 1.26, 1.17, 1.24, 1.27, 1.26, 1.28, 1.18, 1.24, 1.25, 1.21branch_mix: 1.00, 1.01, 1.03, 1.25, 1.22, 1.24, 1.21, 1.23, 1.23, 1.23, 1.18, 1.26, 1.24, 1.21call_depth: 1.00, 1.01, 1.03, 1.11, 1.10, 1.02, 1.08, 1.09, 1.08, 1.08, 1.04, 1.08, 1.07, 1.05float_math: 1.00, 0.95, 0.96, 1.30, 1.32, 1.28, 1.31, 1.30, 1.30, 1.30, 1.28, 1.31, 1.31, 1.31hash_mix: 1.00, 0.93, 0.96, 1.09, 1.10, 1.10, 1.09, 1.10, 1.10, 1.09, 1.10, 1.10, 1.09, 1.10int_accum: 1.00, 0.99, 1.03, 1.26, 1.28, 1.27, 1.27, 1.28, 1.27, 1.28, 1.25, 1.28, 1.28, 1.27int_muldiv: 1.00, 1.00, 1.02, 1.08, 1.07, 1.05, 1.05, 1.07, 1.07, 1.08, 1.03, 1.04, 1.05, 1.04matrix_mul: 1.00, 1.00, 1.03, 4.76, 4.75, 4.73, 4.70, 4.69, 8.12, 8.29, 7.87, 8.21, 8.02, 7.98matrix_mul_f32: 1.00, 1.01, 1.01, 1.72, 1.70, 1.66, 147.84, 351.04, 349.66, 350.32, 351.44, 349.68, 385.21, 384.83mem_copy: 1.00, 1.01, 1.05, 1.79, 1.79, 1.79, 1.77, 1.80, 1.78, 1.80, 1.78, 1.78, 1.77, 1.78poly_dispatch: 1.00, 0.99, 1.02, 2.13, 2.15, 2.12, 2.11, 2.14, 2.56, 2.61, 2.52, 2.63, 2.58, 2.51sieve: 1.00, 1.00, 1.03, 1.12, 1.14, 1.13, 1.13, 1.05, 1.13, 1.14, 1.11, 1.15, 1.15, 1.11sort_small: 1.00, 1.00, 1.01, 1.20, 1.21, 1.16, 1.14, 1.15, 1.26, 1.31, 1.26, 1.31, 1.29, 1.25string_scan: 1.00, 0.99, 1.05, 1.08, 1.09, 1.08, 1.06, 1.07, 1.06, 1.09, 1.05, 1.06, 1.06, 1.04struct_copy: 1.00, 1.00, 1.07, 1.93, 1.94, 1.91, 1.88, 1.91, 1.90, 1.93, 1.86, 1.89, 1.88, 1.861.000.991.031.451.451.421.421.431.511.531.481.521.511.49matrix_mul_f32 384.83×matrix_mul 7.98×poly_dispatch 2.51×struct_copy 1.86×arc_array 1.80×mem_copy 1.78×array_map 1.44×float_math 1.31×int_accum 1.27×sort_small 1.25×branch_mix 1.21×bit_ops 1.21×array_sum 1.15×geometric mean
arm64: xc's speed relative to 0.62
x86-64: xc's speed relative to 0.620.80×0.90×1.00×1.10×1.25×1.50×2.00×3.00×0.620.630.640.650.660.70.710.720.730.740.750.80.850.86arc_array: 1.00, 0.98, 1.01, 0.99, 0.93, 0.94, 0.94, 1.00, 1.01, 1.05, 1.00, 1.00, 1.02, 1.03array_map: 1.00, 0.99, 1.36, 1.37, 2.76, 2.76, 4.98, 4.93, 5.01, 4.98, 6.53, 6.53, 6.53, 6.55array_sum: 1.00, 1.00, 1.29, 1.32, 2.41, 2.56, 3.60, 3.21, 5.01, 5.06, 3.32, 3.32, 5.97, 6.08bit_ops: 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00branch_mix: 1.00, 0.89, 1.01, 1.01, 1.01, 1.01, 1.00, 1.00, 1.00, 1.00, 1.01, 1.01, 1.01, 1.01call_depth: 1.00, 1.00, 1.00, 1.00, 0.71, 2.03, 4.05, 4.03, 4.03, 4.07, 4.08, 4.08, 4.45, 4.44float_math: 1.00, 1.00, 2.03, 1.94, 2.00, 2.00, 1.93, 1.93, 2.00, 2.00, 1.98, 1.98, 2.05, 2.05hash_mix: 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00int_accum: 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00int_muldiv: 1.00, 1.00, 1.01, 1.00, 1.98, 2.02, 3.98, 3.98, 3.96, 3.97, 3.99, 3.99, 4.00, 4.02matrix_mul: 1.00, 1.00, 1.87, 4.31, 4.30, 4.29, 4.28, 4.28, 3.83, 3.82, 19.94, 27.66, 27.06, 26.94matrix_mul_f32: 1.00, 1.05, 1.28, 1.44, 1.66, 1.63, 55.40, 70.09, 69.85, 70.36, 68.64, 71.03, 68.64, 69.54mem_copy: 1.00, 1.00, 1.43, 1.43, 2.21, 2.73, 4.12, 4.33, 4.32, 4.35, 4.45, 4.45, 4.47, 4.45poly_dispatch: 1.00, 1.00, 1.00, 1.01, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.01, 1.01, 1.00sieve: 1.00, 1.00, 1.24, 1.50, 1.34, 1.36, 1.50, 1.33, 1.66, 1.67, 1.88, 1.89, 1.82, 1.82sort_small: 1.00, 1.21, 1.25, 1.25, 1.31, 1.27, 1.21, 1.22, 1.18, 1.21, 2.41, 2.47, 2.45, 2.43string_scan: 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 3.43, 3.43, 3.44, 3.45struct_copy: 1.00, 1.00, 1.32, 1.30, 1.32, 1.31, 1.29, 1.29, 1.29, 1.29, 1.32, 1.32, 1.32, 1.321.001.001.191.261.421.531.801.791.851.862.292.342.432.43matrix_mul_f32 69.54×matrix_mul 26.94×array_map 6.55×array_sum 6.08×mem_copy 4.45×call_depth 4.44×int_muldiv 4.02×string_scan 3.45×sort_small 2.43×float_math 2.05×sieve 1.82×struct_copy 1.32×geometric mean
x86-64: xc's speed relative to 0.62

The compiler that ships. The xc numbers come from the xcc in the download.

The same work in every language. Every version keeps its data where the xc version keeps it (local arrays, not static ones, which clang optimises differently) and leaves nothing a compiler can remove: an object that could be put on the stack outlives its iteration, a call whose target could be resolved at compile time takes its class at run time, and results are folded in so no loop has a closed form. Where the original’s point is reference-counted objects, the C++ version uses std::shared_ptr and the Swift version a class, so they pay for reference counting too.

Different runtimes on the two targets. The Objective-C column is Apple’s Foundation on arm64 and GNUstep with libobjc2 on x86-64, and Swift is 6.2 on the Mac and 6.1 on Linux. These are different implementations, so a language’s times compare within a target and not across one. Swift on Linux is markedly slower on poly_dispatch and array_map than on the Mac; the runs were repeated on an idle machine and reproduce.

Timed regions of about one second. Each benchmark times its own inner loop rather than the process, so start-up and data set-up are excluded.

Alignment noise on x86-64. xcc aligns every loop head on x86-64 to a 32-byte boundary and the start of .text to 64 bytes, so an unrelated change elsewhere cannot move a loop across a fetch boundary; see Optimisation.

The sources are in benchmark/src, one .xc, .m, .cpp and .swift per program, and the runner builds and times them all:

python3 benchmark/run.py --opt O3 --repeats 5
python3 benchmark/page.py

The x86-64 legs cross-build xc here and build the other languages on the configured Linux host; without one the runner measures this machine only. --langs measures some of the languages and adds them to the results already there. Results land in benchmark/<version>/results.json, and page.py turns them into this page.