3232}
3333"""
3434
35+ """
36+ # ARM64 macOS
3537data = {
3638 'Operation': ['Comparisons', 'Addition', 'Subtraction', 'Multiplication', 'Division', 'Modulo'],
3739 'unsigned __int128': [131902, 20613, 20484, 20160, 686521, 777084],
3840 'uint128_t': [133564, 17912, 18237, 20580, 699201, 724648],
3941 'boost::mp::uint128_t': [134182, 40176, 40311, 43285, 945928, 953117]
4042}
43+ """
44+
45+ # x64 macOS
46+ data = {
47+ 'Operation' : ['Comparisons' , 'Addition' , 'Subtraction' , 'Multiplication' , 'Division' , 'Modulo' ],
48+ 'unsigned __int128' : [688225 , 104921 , 129150 , 120363 , 2333812 , 2621949 ],
49+ 'uint128_t' : [712352 , 124992 , 102302 , 119652 , 1981469 , 2219481 ],
50+ 'boost::mp::uint128_t' : [689146 , 137819 , 153484 , 164100 , 2784139 , 2736682 ]
51+ }
4152
4253df = pd .DataFrame (data )
4354
@@ -76,7 +87,7 @@ def get_colors_by_rank(row):
7687
7788ax1 .set_xlabel ('Operations' , fontsize = 12 )
7889ax1 .set_ylabel ('Time (nanoseconds)' , fontsize = 12 )
79- ax1 .set_title ('Clang 20 - ARM64 Benchmark Results' , fontsize = 14 , fontweight = 'bold' )
90+ ax1 .set_title ('Clang 15 - x64 Benchmark Results' , fontsize = 14 , fontweight = 'bold' )
8091ax1 .set_xticks (x )
8192ax1 .set_xticklabels (operations , rotation = 45 , ha = 'right' )
8293ax1 .legend (loc = 'upper left' )
@@ -105,15 +116,15 @@ def get_colors_by_rank(row):
105116
106117ax2 .set_xlabel ('Operations' , fontsize = 12 )
107118ax2 .set_ylabel ('Time (nanoseconds) - Log Scale' , fontsize = 12 )
108- ax2 .set_title ('Clang 20 - ARM64 Benchmark Results (Log Scale)' , fontsize = 14 , fontweight = 'bold' )
119+ ax2 .set_title ('Clang 15 - x64 Benchmark Results (Log Scale)' , fontsize = 14 , fontweight = 'bold' )
109120ax2 .set_yscale ('log' )
110121ax2 .set_xticks (x )
111122ax2 .set_xticklabels (operations , rotation = 45 , ha = 'right' )
112123ax2 .legend (loc = 'upper left' )
113124ax2 .grid (axis = 'y' , alpha = 0.3 , which = 'both' )
114125
115126plt .tight_layout ()
116- plt .savefig ('ARM64_benchmarks .png' , dpi = 300 , bbox_inches = 'tight' )
127+ plt .savefig ('x64_benchmarks .png' , dpi = 300 , bbox_inches = 'tight' )
117128plt .show ()
118129
119130# Create a normalized performance chart
@@ -142,7 +153,7 @@ def get_colors_by_rank(row):
142153
143154ax3 .set_xlabel ('Operations' , fontsize = 12 )
144155ax3 .set_ylabel ('Relative Performance (vs unsigned __int128)' , fontsize = 12 )
145- ax3 .set_title ('Relative Performance Comparison - ARM64 ' , fontsize = 14 , fontweight = 'bold' )
156+ ax3 .set_title ('Relative Performance Comparison - x64 ' , fontsize = 14 , fontweight = 'bold' )
146157ax3 .set_xticks (x )
147158ax3 .set_xticklabels (operations , rotation = 45 , ha = 'right' )
148159ax3 .legend ()
@@ -153,11 +164,11 @@ def get_colors_by_rank(row):
153164 fontsize = 10 , verticalalignment = 'top' , style = 'italic' )
154165
155166plt .tight_layout ()
156- plt .savefig ('ARM64_relative_performance .png' , dpi = 300 , bbox_inches = 'tight' )
167+ plt .savefig ('x64_relative_performance .png' , dpi = 300 , bbox_inches = 'tight' )
157168plt .show ()
158169
159170# Generate summary statistics
160- print ("\n Performance Summary (ARM64 ):" )
171+ print ("\n Performance Summary (x64 ):" )
161172print ("-" * 50 )
162173for impl in implementations :
163174 if impl == 'unsigned __int128' :
0 commit comments