├── .gitignore ├── LICENSE.txt ├── Mcode ├── +dummypkg │ ├── call_nop_in_pkg.m │ └── nop_in_pkg.m ├── @dummyclass │ ├── call_private_nop.m │ ├── dummyclass.m │ ├── nop.m │ └── private │ │ └── private_nop.m ├── DummyClass.m ├── DummyClassWithValidators.m ├── README.md ├── bench_anon_fcn_in_fcn.m ├── bench_matlab_nops.m ├── compareStringAndCharOps.m ├── display_system_info.m ├── dotNet │ └── bench_nops_dotNet │ │ ├── bench_nops_dotNet.sln │ │ ├── bench_nops_netCore │ │ ├── DummyNetClass.cs │ │ └── bench_nops_netCore.csproj │ │ ├── bench_nops_netFw45 │ │ ├── DummyNetClass.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── bench_nops_netFw45.csproj │ │ ├── bench_nops_standard │ │ ├── DummyNetClass.cs │ │ └── bench_nops_netStandard.csproj │ │ └── build │ │ ├── bench_nops_netFw45.dll │ │ ├── bench_nops_netFw45.pdb │ │ ├── netcoreapp2.1 │ │ ├── bench_nops_netCore.deps.json │ │ ├── bench_nops_netCore.dll │ │ └── bench_nops_netCore.pdb │ │ └── netstandard2.0 │ │ ├── bench_nops_netStandard.deps.json │ │ ├── bench_nops_netStandard.dll │ │ └── bench_nops_netStandard.pdb ├── dummymcos.m ├── is_octave.m ├── java │ ├── Makefile │ ├── matlab-bench-internals.jar │ └── src │ │ └── net │ │ └── apjanke │ │ └── matlab_bench │ │ └── bench_nops │ │ └── DummyJavaClass.java ├── mexnop.c ├── mexnop.mexa64 ├── mexnop.mexmaci64 ├── mexnop.mexw32 ├── mexnop.mexw64 ├── nop.m └── show_result.m ├── README.md ├── comparo ├── README.md ├── Reporter.m ├── code │ ├── cxx │ │ ├── .idea │ │ │ ├── .gitignore │ │ │ ├── cxx.iml │ │ │ ├── inspectionProfiles │ │ │ │ └── Project_Default.xml │ │ │ ├── misc.xml │ │ │ ├── modules.xml │ │ │ └── vcs.xml │ │ ├── CMakeCache.txt │ │ ├── CMakeFiles │ │ │ ├── 3.18.4 │ │ │ │ ├── CMakeCCompiler.cmake │ │ │ │ ├── CMakeCXXCompiler.cmake │ │ │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ │ │ ├── CMakeSystem.cmake │ │ │ │ ├── CompilerIdC │ │ │ │ │ ├── CMakeCCompilerId.c │ │ │ │ │ └── a.out │ │ │ │ └── CompilerIdCXX │ │ │ │ │ ├── CMakeCXXCompilerId.cpp │ │ │ │ │ └── a.out │ │ │ ├── CMakeDirectoryInformation.cmake │ │ │ ├── Makefile.cmake │ │ │ ├── Makefile2 │ │ │ ├── TargetDirectories.txt │ │ │ ├── cmake.check_cache │ │ │ ├── cxx.dir │ │ │ │ ├── CXX.includecache │ │ │ │ ├── DependInfo.cmake │ │ │ │ ├── build.make │ │ │ │ ├── cmake_clean.cmake │ │ │ │ ├── depend.internal │ │ │ │ ├── depend.make │ │ │ │ ├── flags.make │ │ │ │ ├── link.txt │ │ │ │ ├── main.cpp.o │ │ │ │ └── progress.make │ │ │ └── progress.marks │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── cmake_install.cmake │ │ ├── cxx │ │ └── main.cpp │ ├── java │ │ ├── .idea │ │ │ ├── .gitignore │ │ │ ├── codeStyles │ │ │ │ ├── Project.xml │ │ │ │ └── codeStyleConfig.xml │ │ │ ├── compiler.xml │ │ │ ├── google-java-format.xml │ │ │ ├── inspectionProfiles │ │ │ │ └── Project_Default.xml │ │ │ ├── jarRepositories.xml │ │ │ ├── misc.xml │ │ │ └── vcs.xml │ │ ├── java.iml │ │ ├── pom.xml │ │ ├── src │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── buh │ │ │ │ ├── BenchyPoo.java │ │ │ │ └── SomeClass.java │ │ └── target │ │ │ ├── classes │ │ │ └── buh │ │ │ │ ├── BenchReport.class │ │ │ │ ├── BenchReportMeta.class │ │ │ │ ├── BenchResults.class │ │ │ │ ├── BenchWriteResults.class │ │ │ │ ├── BenchyException.class │ │ │ │ ├── BenchyPoo.class │ │ │ │ ├── SomeClass.class │ │ │ │ ├── SomeSubclass1.class │ │ │ │ ├── SomeSubclass2.class │ │ │ │ └── SomeSubclass3.class │ │ │ ├── java-0.1-SNAPSHOT.jar │ │ │ ├── lib │ │ │ ├── checker-qual-3.5.0.jar │ │ │ ├── error_prone_annotations-2.3.4.jar │ │ │ ├── failureaccess-1.0.1.jar │ │ │ ├── gson-2.8.6.jar │ │ │ ├── guava-30.0-jre.jar │ │ │ ├── j2objc-annotations-1.3.jar │ │ │ ├── jsr305-3.0.2.jar │ │ │ └── listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar │ │ │ ├── maven-archiver │ │ │ └── pom.properties │ │ │ └── maven-status │ │ │ └── maven-compiler-plugin │ │ │ ├── compile │ │ │ └── default-compile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ │ └── testCompile │ │ │ └── default-testCompile │ │ │ └── inputFiles.lst │ ├── matlab │ │ ├── BenchyPoo.m │ │ ├── SomeClass.m │ │ ├── SomeSubclass1.m │ │ ├── SomeSubclass2.m │ │ ├── SomeSubclass3.m │ │ └── run_benchmark.m │ ├── python │ │ ├── benchitty.py │ │ └── run_benchmark.py │ └── run_benches_mac.sh └── results │ ├── .dummy │ └── Intel W-2150B │ ├── C++ - unknown - Mac.json │ ├── Java - 15 - Mac.json │ ├── Matlab - R2019b - Mac.json │ ├── Matlab - R2020a - Mac.json │ ├── Matlab - R2020b - Mac.json │ └── Python - 3.8.6 - Mac.json └── results └── Intel W-2150B ├── Python - 3.8.6 - Mac.json └── Python - > - Mac.json /.gitignore: -------------------------------------------------------------------------------- 1 | # .gitignore for matlab-bench 2 | # 3 | # This is based on my generic Matlab projects gitignore, but customized for 4 | # matlab-bench. 5 | 6 | # Note that the various binary MEX file formats are NOT included in this .gitignore. 7 | # That is because, unlike with most programming languages, the built binary MEX files 8 | # should be checked into the source tree so your code can still run straight from the 9 | # repo without a build step; they are not just distribution artifacts. 10 | 11 | # Build dirs and artifacts 12 | /build 13 | /dist 14 | /target 15 | /*.mltbx 16 | /coverage 17 | M-doc/ 18 | 19 | # Editor and IDE droppings 20 | .idea 21 | ~* 22 | *.m~ 23 | *.asv 24 | /.factorypath 25 | .classpath 26 | /.ijwb/ 27 | # VS Code stuff 28 | .project 29 | .settings 30 | .vscode 31 | 32 | # Doc site server droppings 33 | _site 34 | .sass-cache 35 | .jekyll-cache 36 | Gemfile.lock 37 | doc-src/site/ 38 | doc/site/ 39 | 40 | # Compiled class file 41 | *.class 42 | 43 | # Log file 44 | *.log 45 | 46 | # BlueJ files 47 | *.ctxt 48 | 49 | # Runtime and debug droppings 50 | matlab-crash-dump* 51 | *.pyc 52 | __pycache__ 53 | /venv/ 54 | *.log 55 | .ipynb_checkpoints 56 | hs_err_pid* 57 | /test-output/ 58 | /test-results/ 59 | /coverage/ 60 | /coverage-results/ 61 | 62 | # Editor, OS, and file browser droppings 63 | *.DS_Store 64 | Thumbs.db 65 | ehthumbs.db 66 | Desktop.ini 67 | $RECYCLE.BIN/ 68 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Andrew Janke 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Mcode/+dummypkg/call_nop_in_pkg.m: -------------------------------------------------------------------------------- 1 | function call_nop_in_pkg(nIters) 2 | 3 | for i = 1:nIters 4 | dummypkg.nop_in_pkg(); 5 | end -------------------------------------------------------------------------------- /Mcode/+dummypkg/nop_in_pkg.m: -------------------------------------------------------------------------------- 1 | function nop_in_pkg() 2 | %NOP_IN_PKG Plain Matlab function that lives inside a package -------------------------------------------------------------------------------- /Mcode/@dummyclass/call_private_nop.m: -------------------------------------------------------------------------------- 1 | function call_private_nop(obj, nIters) 2 | 3 | for i = 1:nIters 4 | private_nop(); 5 | end -------------------------------------------------------------------------------- /Mcode/@dummyclass/dummyclass.m: -------------------------------------------------------------------------------- 1 | function obj = dummyclass() 2 | %DUMMYCLASS Dummy old-style (non-MCOS) class 3 | 4 | obj = class(struct, 'dummyclass'); -------------------------------------------------------------------------------- /Mcode/@dummyclass/nop.m: -------------------------------------------------------------------------------- 1 | function nop(obj) 2 | %NOP Do nothing -------------------------------------------------------------------------------- /Mcode/@dummyclass/private/private_nop.m: -------------------------------------------------------------------------------- 1 | function private_nop() 2 | %PRIVATE_NOP No-op private function in @dummyclass -------------------------------------------------------------------------------- /Mcode/DummyClass.m: -------------------------------------------------------------------------------- 1 | classdef DummyClass 2 | 3 | properties 4 | aWhatever 5 | end 6 | 7 | end 8 | 9 | -------------------------------------------------------------------------------- /Mcode/DummyClassWithValidators.m: -------------------------------------------------------------------------------- 1 | classdef DummyClassWithValidators 2 | 3 | properties 4 | aWhatever 5 | aDouble double 6 | aScalarDouble (1,1) double 7 | aFcnValidator (1,1) double {mustBeFinite(aFcnValidator)} 8 | end 9 | 10 | end 11 | 12 | -------------------------------------------------------------------------------- /Mcode/README.md: -------------------------------------------------------------------------------- 1 | bench_matlab_ops 2 | ================== 3 | 4 | ## Summary 5 | 6 | This is a tool to measure the performance of basic Matlab function call and property access operations. It does this by roughly assessing the overhead of no-op or "nop" function calls. 7 | 8 | This tool is not interested in the performance of numeric operations, useful functions, or anything else that does real calculations. 9 | 10 | This is a reproduction of the code used to produce the benchmarks in this StackOverflow question. http://stackoverflow.com/questions/1693429/is-matlab-oop-slow-or-am-i-doing-something-wrong 11 | 12 | Your measurement results may vary between machines, operating systems, Matlab releases, 32-bit vs 64-bit architectures, and phase of the moon. The numbers should only be taken as indicative of the relative cost of operations within a given Matlab environment, and between Matlab releases. They are not precise or broadly applicable. 13 | 14 | ## Usage 15 | 16 | To use this tool, open Matlab, `cd` to this directory, and run `bench_matlab_ops`. For details, see its helptext and source code. 17 | 18 | ## Code Style 19 | 20 | The code style in this tool is written to minimize the chance of interfering with the measurement of the operations being benchmarked. There's a good deal of copy-and-paste code, un-scoped functions, and redundancy. Don't take this as indicative of what normal Matlab code should look like (or what I normally write, for that matter). 21 | 22 | ## Build Notes 23 | 24 | ### MEX Functions 25 | 26 | The binary MEX functions were built with the default `mex mexnop.c` command, under the following environments. 27 | 28 | * Windows (x86 and x64): Windows 7 SDK on Windows 7 SP1 29 | * Mac OS X: LLVM-gcc from Xcode 5.1 on OS X 10.9 Mavericks 30 | * Linux: gcc 4.7.2 on Debian 7.4 31 | 32 | ### Tic/toc 33 | 34 | The code uses Matlab's `tic`/`toc` functions to do timing. There is an issue with them returning incorrect timings on certain processors. (An issue with CPU frequency scaling and the hardware timer.) If tic/toc hits this bug on your CPU, the results will be wrong here. 35 | 36 | ### Assumptions 37 | 38 | 39 | * Calling stuff from within a local function is as cheap as calling it from a top-level function. 40 | * The "end" syntax for function definitions doesn't affect performance of things you call from that function 41 | * tic/toc works and returns wall time (untrue on some CPUs due to a timer bug) 42 | * A couple frames sitting on the function call stack don't affect performance. 43 | 44 | -------------------------------------------------------------------------------- /Mcode/bench_anon_fcn_in_fcn.m: -------------------------------------------------------------------------------- 1 | function bench_anon_fcn_in_fcn(nIters, isDryRun) 2 | 3 | name = '@()[] anonymous fcn (in fcn)'; 4 | anonNopFcn = @()[]; 5 | t0 = tic; 6 | for i = 1:nIters 7 | anonNopFcn(); 8 | end 9 | te = toc(t0); 10 | show_result(name, nIters, te, isDryRun); 11 | -------------------------------------------------------------------------------- /Mcode/bench_matlab_nops.m: -------------------------------------------------------------------------------- 1 | function bench_matlab_nops(doWarmupRun, nIters) 2 | % Benchmark basic "no-op" operations of various sorts. 3 | % 4 | % bench_matlab_nops(doWarmupRun, nIters) 5 | % 6 | % DoWarmupRun (true*/false) is whether to do an unmeasured warmup run 7 | % first before the main test run. You should leave this on. 8 | % 9 | % NIters (numeric, 100_000*) is the number of iterations of each operation 10 | % to test. This is the number of iterations of the operation itself to run, 11 | % not the overall test of that type of operation. The iterations are done 12 | % in tight loops coded specifically to each operation's benchmark. Larger 13 | % numbers give more accurate results (hopefully). Small numbers will 14 | % definitely give bogus results. 15 | % 16 | % All arguments are optional. 17 | % 18 | % Displays the results to the console. 19 | 20 | %#ok<*FVAL> 21 | 22 | if nargin < 1 || isempty(doWarmupRun); doWarmupRun = true; end 23 | if nargin < 2 || isempty(nIters); nIters = 100000; end 24 | nWarmupIters = 10000; 25 | 26 | myParentDir = fileparts(mfilename('fullpath')); 27 | 28 | fprintf('\n'); 29 | display_system_info(); 30 | runNotes = {sprintf('nIters = %d', nIters)}; 31 | if ~doWarmupRun 32 | runNotes{end+1} = 'NO WARM-UP RUN'; 33 | end 34 | fprintf('%s\n', strjoin(runNotes, ', ')); 35 | fprintf('\n'); 36 | 37 | % TODO: sanity checks: system load, detect tic/toc timer bugs 38 | 39 | % Preparation 40 | 41 | % Get our Java classes on the path 42 | % Be sloppy and skip the try/catch or onCleanup() just in case that affects 43 | % our timings. 44 | myJavaJarFile = fullfile(myParentDir, 'java', 'matlab-bench-internals.jar'); 45 | javaaddpath(myJavaJarFile); 46 | 47 | % Get our .NET assemblies on the path 48 | if ispc 49 | myDotNetDir = [fileparts(mfilename('fullpath')) '/dotNet/bench_nops_dotNet/build/']; 50 | % Load .net assemblies 51 | NET.addAssembly([myDotNetDir '/bench_nops_netFw45.dll']); 52 | % NET.addAssembly([myDotNetDir '/netcoreapp2.1/bench_nops_netCore.dll']); % does not load 53 | NET.addAssembly([myDotNetDir '/netstandard2.0/bench_nops_netStandard.dll']); 54 | end 55 | 56 | % Warm-up pass 57 | if doWarmupRun 58 | bench_nops_pass(nWarmupIters, true); 59 | end 60 | 61 | % Benchmarking pass 62 | bench_nops_pass(nIters, false); 63 | 64 | % Cleanup 65 | javarmpath(myJavaJarFile); 66 | if ispc 67 | % .NET dlls can't be unloaded; if needed, please restart Matlab. 68 | end 69 | 70 | end 71 | 72 | function bench_nops_pass(nIters, isWarmupRun) 73 | 74 | show_results_header(isWarmupRun); 75 | 76 | 77 | name = 'nop() function'; 78 | t0 = tic; 79 | for i = 1:nIters 80 | nop(); 81 | end 82 | te = toc(t0); 83 | show_result(name, nIters, te, isWarmupRun); 84 | 85 | name = 'nop() subfunction'; 86 | t0 = tic; 87 | for i = 1:nIters 88 | nop_subfunction(); 89 | end 90 | te = toc(t0); 91 | show_result(name, nIters, te, isWarmupRun); 92 | 93 | bench_anonymous_function(nIters, isWarmupRun); 94 | 95 | % Skip this one... it benches the same for me 96 | %bench_anon_fcn_in_fcn(nIters, isDryRun); 97 | 98 | name = 'nop(obj) method'; 99 | obj = dummyclass; 100 | t0 = tic; 101 | for i = 1:nIters 102 | nop(obj); 103 | end 104 | te = toc(t0); 105 | clear obj; 106 | show_result(name, nIters, te, isWarmupRun); 107 | 108 | 109 | name = 'nop() private fcn on @class'; 110 | obj = dummyclass; 111 | t0 = tic; 112 | call_private_nop(obj, nIters); 113 | te = toc(t0); 114 | clear obj; 115 | show_result(name, nIters, te, isWarmupRun); 116 | 117 | 118 | % MCOS methods 119 | obj = dummymcos; 120 | 121 | name = 'classdef nop(obj)'; 122 | t0 = tic; 123 | for i = 1:nIters 124 | nop(obj); 125 | end 126 | te = toc(t0); 127 | show_result(name, nIters, te, isWarmupRun); 128 | 129 | name = 'classdef obj.nop()'; 130 | t0 = tic; 131 | for i = 1:nIters 132 | obj.nop(); 133 | end 134 | te = toc(t0); 135 | show_result(name, nIters, te, isWarmupRun); 136 | 137 | name = 'classdef private_nop(obj)'; 138 | t0 = tic; 139 | obj.call_private_nop(nIters); 140 | te = toc(t0); 141 | show_result(name, nIters, te, isWarmupRun); 142 | 143 | name = 'classdef class.static_nop()'; 144 | t0 = tic; 145 | for i = 1:nIters 146 | dummymcos.static_nop(); 147 | end 148 | te = toc(t0); 149 | show_result(name, nIters, te, isWarmupRun); 150 | 151 | name = 'classdef obj.static_nop()'; 152 | dummyobj = dummymcos; 153 | t0 = tic; 154 | for i = 1:nIters 155 | dummyobj.static_nop(); 156 | end 157 | te = toc(t0); 158 | show_result(name, nIters, te, isWarmupRun); 159 | 160 | name = 'classdef constant'; 161 | t0 = tic; 162 | for i = 1:nIters 163 | dummymcos.MY_CONSTANT; 164 | end 165 | te = toc(t0); 166 | show_result(name, nIters, te, isWarmupRun); 167 | 168 | name = 'classdef property'; 169 | t0 = tic; 170 | for i = 1:nIters 171 | obj.foo; 172 | end 173 | te = toc(t0); 174 | show_result(name, nIters, te, isWarmupRun); 175 | 176 | name = 'classdef property with getter'; 177 | t0 = tic; 178 | for i = 1:nIters 179 | obj.propWithGetter; 180 | end 181 | te = toc(t0); 182 | show_result(name, nIters, te, isWarmupRun); 183 | 184 | % End of MCOS methods 185 | clear obj; 186 | 187 | name = '+pkg.nop() function'; 188 | t0 = tic; 189 | for i = 1:nIters 190 | dummypkg.nop_in_pkg(); 191 | end 192 | te = toc(t0); 193 | show_result(name, nIters, te, isWarmupRun); 194 | 195 | name = '+pkg.nop() from inside +pkg'; 196 | t0 = tic; 197 | dummypkg.call_nop_in_pkg(nIters); 198 | te = toc(t0); 199 | show_result(name, nIters, te, isWarmupRun); 200 | 201 | name = 'feval(''nop'')'; 202 | fcnName = 'nop'; 203 | t0 = tic; 204 | for i = 1:nIters 205 | feval(fcnName); 206 | end 207 | te = toc(t0); 208 | clear fcnName; 209 | show_result(name, nIters, te, isWarmupRun); 210 | 211 | name = 'feval(@nop)'; 212 | fcn = @nop; 213 | t0 = tic; 214 | for i = 1:nIters 215 | feval(fcn); 216 | end 217 | te = toc(t0); 218 | clear fcn; 219 | show_result(name, nIters, te, isWarmupRun); 220 | 221 | name = 'eval(''nop'')'; 222 | fcnName = 'nop()'; 223 | t0 = tic; 224 | for i = 1:nIters 225 | eval(fcnName); %#ok 226 | end 227 | te = toc(t0); 228 | clear fcnName; 229 | show_result(name, nIters, te, isWarmupRun); 230 | 231 | if ispc 232 | %% .NET tests 233 | % .NET 4.5 234 | netObj45 = bench_nops_netFw45.DummyNetClass; 235 | 236 | name = '.NET 4.5 obj.nop()'; 237 | t0 = tic; 238 | for i = 1:nIters 239 | netObj45.nop(); 240 | end 241 | te = toc(t0); 242 | show_result(name, nIters, te, isWarmupRun); 243 | 244 | name = '.NET 4.5 nop(obj)'; 245 | t0 = tic; 246 | for i = 1:nIters 247 | nop(netObj45); 248 | end 249 | te = toc(t0); 250 | show_result(name, nIters, te, isWarmupRun); 251 | 252 | name = '.NET 4.5 feval(''nop'',obj)'; 253 | fcnName = 'nop'; 254 | t0 = tic; 255 | for i = 1:nIters 256 | feval(fcnName, netObj45); 257 | end 258 | te = toc(t0); 259 | clear fcnName; 260 | show_result(name, nIters, te, isWarmupRun); 261 | 262 | name = '.NET 4.5 Klass.staticNop()'; 263 | t0 = tic; 264 | for i = 1:nIters 265 | bench_nops_netFw45.DummyNetClass.staticNop(); 266 | end 267 | te = toc(t0); 268 | show_result(name, nIters, te, isWarmupRun); 269 | 270 | name = '.NET 4.5 obj.nop() from .NET'; 271 | t0 = tic; 272 | netObj45.callNop(nIters); 273 | te = toc(t0); 274 | show_result(name, nIters, te, isWarmupRun); 275 | 276 | % End .NET 4.5 tests 277 | clear netObj45; 278 | 279 | % .NET Standard 2.0 280 | netObjStd2 = bench_nops_netStandard.DummyNetClass; 281 | 282 | name = '.NET std 2.0 obj.nop()'; 283 | t0 = tic; 284 | for i = 1:nIters 285 | netObjStd2.nop(); 286 | end 287 | te = toc(t0); 288 | show_result(name, nIters, te, isWarmupRun); 289 | 290 | name = '.NET std 2.0 nop(obj)'; 291 | t0 = tic; 292 | for i = 1:nIters 293 | nop(netObjStd2); 294 | end 295 | te = toc(t0); 296 | show_result(name, nIters, te, isWarmupRun); 297 | 298 | name = '.NET std 2.0 feval(''nop'',obj)'; 299 | fcnName = 'nop'; 300 | t0 = tic; 301 | for i = 1:nIters 302 | feval(fcnName, netObjStd2); 303 | end 304 | te = toc(t0); 305 | clear fcnName; 306 | show_result(name, nIters, te, isWarmupRun); 307 | 308 | name = '.NET std 2.0 Klass.staticNop()'; 309 | t0 = tic; 310 | for i = 1:nIters 311 | bench_nops_netStandard.DummyNetClass.staticNop(); 312 | end 313 | te = toc(t0); 314 | show_result(name, nIters, te, isWarmupRun); 315 | 316 | name = '.NET std 2.0 obj.nop() from .NET'; 317 | t0 = tic; 318 | netObjStd2.callNop(nIters); 319 | te = toc(t0); 320 | show_result(name, nIters, te, isWarmupRun); 321 | 322 | % End .NET tests 323 | clear netObjStd; 324 | end 325 | 326 | 327 | %% Java tests 328 | try 329 | jObj = javaObject('net.apjanke.matlab_bench.bench_nops.DummyJavaClass'); 330 | 331 | name = 'Java obj.nop()'; 332 | t0 = tic; 333 | for i = 1:nIters 334 | jObj.nop(); 335 | end 336 | te = toc(t0); 337 | show_result(name, nIters, te, isWarmupRun); 338 | 339 | name = 'Java nop(obj)'; 340 | t0 = tic; 341 | for i = 1:nIters 342 | nop(jObj); 343 | end 344 | te = toc(t0); 345 | show_result(name, nIters, te, isWarmupRun); 346 | 347 | name = 'Java feval(''nop'',obj)'; 348 | fcnName = 'nop'; 349 | t0 = tic; 350 | for i = 1:nIters 351 | feval(fcnName, jObj); 352 | end 353 | te = toc(t0); 354 | clear fcnName; 355 | show_result(name, nIters, te, isWarmupRun); 356 | 357 | if ~is_octave 358 | name = 'Java Klass.staticNop()'; 359 | t0 = tic; 360 | for i = 1:nIters 361 | net.apjanke.matlab_bench.bench_nops.DummyJavaClass.staticNop(); 362 | end 363 | te = toc(t0); 364 | show_result(name, nIters, te, isWarmupRun); 365 | end 366 | 367 | name = 'Java obj.nop() from Java'; 368 | t0 = tic; 369 | jObj.callNop(nIters); 370 | te = toc(t0); 371 | show_result(name, nIters, te, isWarmupRun); 372 | 373 | catch err 374 | fprintf('Java tests errored: %s. Skipping.\n', err.message); 375 | end 376 | 377 | % End Java tests 378 | clear jObj; 379 | 380 | try 381 | name = 'MEX mexnop()'; 382 | t0 = tic; 383 | for i = 1:nIters 384 | mexnop(); 385 | end 386 | te = toc(t0); 387 | show_result(name, nIters, te, isWarmupRun); 388 | catch err 389 | fprintf('MEX tests errored: %s. Skipping.\n', err.message); 390 | end 391 | 392 | name = 'builtin j()'; 393 | t0 = tic; 394 | for i = 1:nIters 395 | j(); 396 | end 397 | te = toc(t0); 398 | show_result(name, nIters, te, isWarmupRun); 399 | 400 | 401 | name = 'struct s.foo field access'; 402 | s = struct; 403 | s.foo = []; 404 | t0 = tic; 405 | for i = 1:nIters 406 | s.foo; 407 | end 408 | te = toc(t0); 409 | show_result(name, nIters, te, isWarmupRun); 410 | clear s 411 | 412 | name = 'obj.foo = 42 (unvalidated)'; 413 | obj = DummyClassWithValidators; 414 | x = 42; 415 | t0 = tic; 416 | for i = 1:nIters 417 | obj.aWhatever = x; 418 | end 419 | te = toc(t0); 420 | show_result(name, nIters, te, isWarmupRun); 421 | clear obj x 422 | 423 | name = 'obj.foo = 42 (double)'; 424 | obj = DummyClassWithValidators; 425 | x = 42; 426 | t0 = tic; 427 | for i = 1:nIters 428 | obj.aDouble = x; 429 | end 430 | te = toc(t0); 431 | show_result(name, nIters, te, isWarmupRun); 432 | clear obj x 433 | 434 | name = 'obj.foo = 42 ((1,1) double)'; 435 | obj = DummyClassWithValidators; 436 | x = 42; 437 | t0 = tic; 438 | for i = 1:nIters 439 | obj.aScalarDouble = x; 440 | end 441 | te = toc(t0); 442 | show_result(name, nIters, te, isWarmupRun); 443 | clear obj x 444 | 445 | name = 'obj.foo = 42 ({must...})'; 446 | obj = DummyClassWithValidators; 447 | x = 42; 448 | t0 = tic; 449 | for i = 1:nIters 450 | obj.aFcnValidator = x; 451 | end 452 | te = toc(t0); 453 | show_result(name, nIters, te, isWarmupRun); 454 | clear obj x 455 | 456 | name = 'isempty(persistent)'; 457 | t0 = tic; 458 | call_isempty_on_persistent(nIters); 459 | te = toc(t0); 460 | show_result(name, nIters, te, isWarmupRun); 461 | 462 | fprintf('\n'); 463 | 464 | end 465 | 466 | function show_results_header(isDryRun) 467 | if isDryRun 468 | return; 469 | end 470 | % Align 'μsec...' with 1s place instead of field beginning; looks better. 471 | %fprintf('%-30s %-6s %-6s \n', 'Operation', 'Total', ' Per Call (μsec)'); 472 | fprintf('%-30s %-12s \n', 'Operation', 'Time (μsec)'); 473 | end 474 | 475 | function call_isempty_on_persistent(nIters) 476 | 477 | persistent foo 478 | if isempty(foo) 479 | foo = 42; 480 | end 481 | 482 | for i = 1:nIters 483 | isempty(foo); 484 | end 485 | 486 | end 487 | 488 | 489 | function bench_anonymous_function(nIters, isDryRun) 490 | % Subfunction (local function) nop 491 | name = '@()[] anonymous function'; 492 | anonNopFcn = @()[]; 493 | t0 = tic; 494 | for i = 1:nIters 495 | anonNopFcn(); 496 | end 497 | te = toc(t0); 498 | show_result(name, nIters, te, isDryRun); 499 | 500 | end 501 | 502 | function nop_subfunction() 503 | %NOP_SUBFUNCTION Subfunction (local function) that does nothing 504 | end 505 | 506 | -------------------------------------------------------------------------------- /Mcode/compareStringAndCharOps.m: -------------------------------------------------------------------------------- 1 | function out = compareStringAndCharOps(nIters, groupsToRun) 2 | % Compare speed of equivalent string and char array operations. 3 | % 4 | % out = compareStringAndCharOps(nIters, groupsToRun) 5 | % 6 | % It is recommended that you call this function a few times, to let the 7 | % Matlab interpreter and JIT warm up. 8 | % 9 | % nIters is the number of times to run each test. 10 | % 11 | % Returns a struct, whose format is subject to change. If output is not 12 | % captured, displays the results in human-readable format. 13 | 14 | % Developer notes: 15 | % 16 | % * Avoid using timeit and anonymous functions, because that introduces 17 | % overhead. 18 | % 19 | % * For really small operations, garbage collection of temporary values is 20 | % probably significantly influencing results. 21 | 22 | %#ok<*ASGLU> 23 | 24 | arguments 25 | nIters (1,1) double = NaN 26 | groupsToRun string = [] 27 | end 28 | if isnan(nIters) 29 | % Need about 10,000 iters to get times long enough to pick up the fastest 30 | % operations. 31 | nIters = 10000; 32 | end 33 | allTestGroups = ["convert" "extract" "regexp" "equality" "strops"]; 34 | if isempty(groupsToRun) 35 | groupsToRun = allTestGroups; 36 | end 37 | badGroups = setdiff(groupsToRun, allTestGroups); 38 | if ~isempty(badGroups) 39 | error('Invalid test groups: %s\n', strjoin(badGroups, " ")); 40 | end 41 | 42 | 43 | %#ok<*NASGU> 44 | %#ok<*AGROW> 45 | 46 | % Localized randstream with fixed seed for reproducible runs 47 | myRand = RandStream('mt19937ar', 'Seed', 420.69); 48 | % Arbitrary cutoff for alphabet to use 49 | codePointLimit = hex2dec('A7FF'); 50 | 51 | % { Name, CharTime, StringTime; ... } 52 | rsltsBuf = { 53 | }; 54 | 55 | function [out,outStr] = makeRandomString(nChars) 56 | out = char(myRand.randi([33 codePointLimit], 1, nChars)); 57 | outStr = string(out); 58 | end 59 | 60 | function [out,outStrs] = makeRandomStrings(nStrings, nChars) 61 | outStrs = repmat(string(missing), [1 nStrings]); 62 | outStrs(1) = makeRandomString(nChars); 63 | blah = char(outStrs(1)); 64 | mychar = blah(1); 65 | for iStr = 2:nStrings 66 | mychar = char(max(mod(double(mychar) + 1, codePointLimit), 33)); 67 | blah(end) = mychar; 68 | outStrs(iStr) = blah; 69 | end 70 | out = cellstr(outStrs); 71 | end 72 | 73 | % Tests 74 | 75 | if ismember("convert", groupsToRun) 76 | 77 | % Construct a string 78 | 79 | strLens = [1 1000 100000]; 80 | 81 | for strLen = strLens 82 | name = sprintf('Construct from char, len=%d', strLen); 83 | [chr,str] = makeRandomString(strLen); 84 | t0 = tic; 85 | for i = 1:nIters 86 | % TODO: Would it be more realistic to trigger a CoW here? 87 | foo = chr; 88 | end 89 | teChar = toc(t0); 90 | t0 = tic; 91 | for i = 1:nIters 92 | foo = string(chr); 93 | end 94 | teStr = toc(t0); 95 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 96 | end 97 | 98 | % Extract one string as char 99 | 100 | for strLen = strLens 101 | name = sprintf('Convert scalar string as char (s{1}), len=%d', strLen); 102 | [chr,str] = makeRandomString(strLen); 103 | t0 = tic; 104 | for i = 1:nIters 105 | foo = chr; 106 | end 107 | teChar = toc(t0); 108 | t0 = tic; 109 | for i = 1:nIters 110 | foo = str{1}; 111 | end 112 | teStr = toc(t0); 113 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 114 | end 115 | 116 | for strLen = strLens 117 | name = sprintf('Convert scalar string as char (char(s)), len=%d', strLen); 118 | [chr,str] = makeRandomString(strLen); 119 | t0 = tic; 120 | for i = 1:nIters 121 | foo = chr; 122 | end 123 | teChar = toc(t0); 124 | t0 = tic; 125 | for i = 1:nIters 126 | foo = char(str); 127 | end 128 | teStr = toc(t0); 129 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 130 | end 131 | 132 | for strLen = strLens 133 | name = sprintf('charvec from scalar cellstr/string (s{1}), len=%d', strLen); 134 | [chr,str] = makeRandomString(strLen); 135 | cstr = cellstr(str); 136 | t0 = tic; 137 | for i = 1:nIters 138 | foo = cstr{1}; 139 | end 140 | teChar = toc(t0); 141 | t0 = tic; 142 | for i = 1:nIters 143 | foo = str{1}; 144 | end 145 | teStr = toc(t0); 146 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 147 | end 148 | 149 | % Implicit conversion to char 150 | 151 | strLens = [1 100 1000 10000 100000]; 152 | for strLen = strLens 153 | name = sprintf('Impl conv to from variable scalar char, len=%d', strLen); 154 | [chr,str] = makeRandomString(strLen); 155 | charOneChar = 'x'; 156 | t0 = tic; 157 | for i = 1:nIters 158 | chr(1) = charOneChar; 159 | end 160 | teChar = toc(t0); 161 | strOneChar = "x"; 162 | t0 = tic; 163 | for i = 1:nIters 164 | chr(1) = strOneChar; 165 | end 166 | teStr = toc(t0); 167 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 168 | end 169 | 170 | for strLen = strLens 171 | name = sprintf('Impl conv from literal to scalar char, len=%d', strLen); 172 | [chr,str] = makeRandomString(strLen); 173 | t0 = tic; 174 | for i = 1:nIters 175 | chr(1) = 'x'; 176 | end 177 | teChar = toc(t0); 178 | t0 = tic; 179 | for i = 1:nIters 180 | chr(1) = "x"; 181 | end 182 | teStr = toc(t0); 183 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 184 | end 185 | 186 | end 187 | 188 | if ismember("extract", groupsToRun) 189 | 190 | % Extract text 191 | 192 | for strLen = [100 1000] 193 | name = sprintf('Extract scattered ixed substr (c(ix) vs extract), len=%d', strLen); 194 | [chr,str] = makeRandomString(strLen); 195 | ix = myRand.randi(strLen, 1, floor(strLen/10)); 196 | t0 = tic; 197 | for i = 1:nIters 198 | foo = chr(ix); 199 | end 200 | teChar = toc(t0); 201 | t0 = tic; 202 | for i = 1:nIters 203 | foo = repmat(' ', [1 numel(ix)]); 204 | for iChr = 1:numel(ix) 205 | foo(iChr) = extract(str, ix(iChr)); 206 | end 207 | end 208 | teStr = toc(t0); 209 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 210 | end 211 | 212 | end 213 | 214 | % Some regexps 215 | 216 | if ismember("regexp", groupsToRun) 217 | 218 | name = 'regexp match'; 219 | thisFile = [mfilename('fullpath') '.m']; 220 | chr = fileread(thisFile); 221 | str = string(chr); 222 | pat = 'makeRandomString.*rsltsBuf'; 223 | patStr = string(pat); 224 | t0 = tic; 225 | for i = 1:nIters 226 | [a,b] = regexp(chr, pat); 227 | end 228 | teChar = toc(t0); 229 | t0 = tic; 230 | for i = 1:nIters 231 | [a,b] = regexp(str, patStr); 232 | end 233 | teStr = toc(t0); 234 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 235 | 236 | name = 'regexp capture one big token'; 237 | thisFile = [mfilename('fullpath') '.m']; 238 | chr = fileread(thisFile); 239 | str = string(chr); 240 | pat = 'makeRandomString.*rsltsBuf'; 241 | patStr = string(pat); 242 | t0 = tic; 243 | for i = 1:nIters 244 | [a,b] = regexp(chr, pat, 'start', 'tokens'); 245 | end 246 | teChar = toc(t0); 247 | t0 = tic; 248 | for i = 1:nIters 249 | [a,b] = regexp(str, patStr, "start", "tokens"); 250 | end 251 | teStr = toc(t0); 252 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 253 | 254 | name = 'regexp capture many little tokens'; 255 | thisFile = [mfilename('fullpath') '.m']; 256 | chr = fileread(thisFile); 257 | str = string(chr); 258 | pat = 'rslts\.\w+'; 259 | patStr = string(pat); 260 | t0 = tic; 261 | for i = 1:nIters 262 | [a,b] = regexp(chr, pat, 'start', 'tokens'); 263 | end 264 | teChar = toc(t0); 265 | t0 = tic; 266 | for i = 1:nIters 267 | [a,b] = regexp(str, patStr, "start", "tokens"); 268 | end 269 | teStr = toc(t0); 270 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 271 | 272 | end 273 | 274 | % Equality tests 275 | 276 | function [chr, str, cstrs, strs] = makeEqtestStrs(nStrs, strLen) 277 | [chr,str] = makeRandomString(strLen); 278 | chr2 = chr; 279 | chr2(end) = char(chr2(end) + 1); 280 | str2 = string(chr2); 281 | % This is cheating because the repmatted arrays might share 282 | % underlying data 283 | strs = repmat(str2, [1 nStrs]); 284 | cstrs = cellstr(strs); 285 | end 286 | 287 | if ismember("equality", groupsToRun) 288 | 289 | strLens = [1 100 1000]; 290 | nStrss = [1 10 1000]; 291 | 292 | for strLen = strLens 293 | for nStrs = nStrss 294 | name = sprintf('strcmp, no match (end diff), nstrs=%d, strlen=%d', nStrs, strLen); 295 | [chr, str, cstrs, strs] = makeEqtestStrs(nStrs, strLen); 296 | t0 = tic; 297 | for i = 1:nIters 298 | strcmp(chr, cstrs); 299 | end 300 | teChar = toc(t0); 301 | t0 = tic; 302 | for i = 1:nIters 303 | strcmp(str, strs); 304 | end 305 | teStr = toc(t0); 306 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 307 | end 308 | end 309 | 310 | for strLen = strLens 311 | for nStrs = nStrss 312 | name = sprintf('strcmp vs ==, no match (end diff), nstrs=%d, strlen=%d', nStrs, strLen); 313 | [chr, str, cstrs, strs] = makeEqtestStrs(nStrs, strLen); 314 | t0 = tic; 315 | for i = 1:nIters 316 | foo = strcmp(chr, cstrs); 317 | end 318 | teChar = toc(t0); 319 | t0 = tic; 320 | for i = 1:nIters 321 | foo = str == strs; 322 | end 323 | teStr = toc(t0); 324 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 325 | end 326 | end 327 | 328 | for strLen = strLens 329 | for nStrs = nStrss 330 | name = sprintf('ismember, no match (end diff), nstrs=%d, strlen=%d', nStrs, strLen); 331 | [chr, str, cstrs, strs] = makeEqtestStrs(nStrs, strLen); 332 | t0 = tic; 333 | for i = 1:nIters 334 | foo = ismember(chr, cstrs); 335 | end 336 | teChar = toc(t0); 337 | t0 = tic; 338 | for i = 1:nIters 339 | foo = ismember(str, strs); 340 | end 341 | teStr = toc(t0); 342 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 343 | end 344 | end 345 | 346 | end 347 | 348 | if ismember("strops", groupsToRun) 349 | 350 | % strjoin and split 351 | 352 | nStrss = [1 1000]; % Keep this small bc the char version is *slow* 353 | strLen = 42; 354 | 355 | for nStrs = nStrss 356 | name = sprintf('strjoin, nstrs=%d, len=%d', nStrs, strLen); 357 | [cstrs,strs] = makeRandomStrings(nStrs, strLen); 358 | t0 = tic; 359 | for i = 1:nIters 360 | foo = strjoin(cstrs, ' '); 361 | end 362 | teChar = toc(t0); 363 | strOneChar = "x"; 364 | t0 = tic; 365 | for i = 1:nIters 366 | foo = strjoin(strs, " "); 367 | end 368 | teStr = toc(t0); 369 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 370 | end 371 | 372 | strLens = [1 10 1000]; 373 | nPartss = [1 10 1000]; 374 | for strLen = strLens 375 | for nParts = nPartss 376 | name = sprintf('strsplit, nparts=%d, len=%d', nParts, strLen); 377 | [cParts,strParts] = makeRandomStrings(nParts, strLen); 378 | str = strjoin(strParts, ','); 379 | cstr = char(str); 380 | t0 = tic; 381 | for i = 1:nIters 382 | foo = strsplit(cstr, ','); 383 | end 384 | teChar = toc(t0); 385 | t0 = tic; 386 | for i = 1:nIters 387 | foo = strsplit(str, ","); 388 | end 389 | teStr = toc(t0); 390 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 391 | end 392 | end 393 | 394 | % erase 395 | strLens = [1 10 1000]; 396 | nPartss = [1 10 1000]; 397 | for strLen = strLens 398 | for nParts = nPartss 399 | name = sprintf('erase, nparts=%d, len=%d', nParts, strLen); 400 | [cParts,strParts] = makeRandomStrings(nParts, strLen); 401 | joiner = 'foobar'; 402 | joinerStr = string(joiner); 403 | str = strjoin(strParts, joiner); 404 | cstr = char(str); 405 | t0 = tic; 406 | for i = 1:nIters 407 | foo = erase(cstr, joiner); 408 | end 409 | teChar = toc(t0); 410 | t0 = tic; 411 | for i = 1:nIters 412 | foo = erase(str, joinerStr); 413 | end 414 | teStr = toc(t0); 415 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 416 | end 417 | end 418 | 419 | % strrep 420 | strLens = [1 10]; 421 | nPartss = [1 10 1000]; 422 | for strLen = strLens 423 | for nParts = nPartss 424 | name = sprintf('strrep, noccurs=%d, len=%d', nParts, strLen); 425 | [cParts,strParts] = makeRandomStrings(nParts, strLen); 426 | joiner = 'foobar'; 427 | replacement = 'whatever'; 428 | joinerStr = string(joiner); 429 | replacementStr = string(replacement); 430 | str = strjoin(strParts, joiner); 431 | cstr = char(str); 432 | t0 = tic; 433 | for i = 1:nIters 434 | foo = strrep(cstr, joiner, replacement); 435 | end 436 | teChar = toc(t0); 437 | t0 = tic; 438 | for i = 1:nIters 439 | foo = strrep(str, joinerStr, replacementStr); 440 | end 441 | teStr = toc(t0); 442 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 443 | end 444 | end 445 | 446 | % regexprep 447 | strLens = [1 10]; 448 | nPartss = [1 10 1000]; 449 | for strLen = strLens 450 | for nParts = nPartss 451 | name = sprintf('regexprep, noccurs=%d, len=%d', nParts, strLen); 452 | [cParts,strParts] = makeRandomStrings(nParts, strLen); 453 | joiner = 'foobar'; 454 | pattern = 'f.*?r'; 455 | replacement = 'whatever'; 456 | joinerStr = string(joiner); 457 | replacementStr = string(replacement); 458 | str = strjoin(strParts, joiner); 459 | cstr = char(str); 460 | t0 = tic; 461 | for i = 1:nIters 462 | foo = regexprep(cstr, joiner, replacement); 463 | end 464 | teChar = toc(t0); 465 | t0 = tic; 466 | for i = 1:nIters 467 | foo = regexprep(str, joinerStr, replacementStr); 468 | end 469 | teStr = toc(t0); 470 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 471 | end 472 | end 473 | 474 | % Numeric conversion 475 | %nNumss = [1 100 1000]; 476 | % Parsing 1,000 numbers with str2double is just insufferably slow. Be 477 | % smaller. 478 | nNumss = [1 100 200]; 479 | for nNums = nNumss 480 | name = sprintf('str2double/double(str) (ints), nNums=%d', nNums); 481 | someInts = randi([-10000, 10000], [1, nNums]); 482 | intStrs = string(someInts); 483 | intCellstrs = cellstr(intStrs); 484 | 485 | t0 = tic; 486 | for i = 1:nIters 487 | foo = str2double(intCellstrs); 488 | end 489 | teChar = toc(t0); 490 | t0 = tic; 491 | for i = 1:nIters 492 | bar = double(intStrs); 493 | end 494 | teStr = toc(t0); 495 | % t0 = tic; 496 | % for i = 1:nIters 497 | % bar = double(string(intCellstrs)); 498 | % end 499 | % teStrCellstr = toc(t0); 500 | % fprintf('%4d nums: str2double = %f double(str) = %f double(string(cellstr)) = %f\n', nNums, teChar, teStr, teStrCellstr); 501 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 502 | end 503 | for nNums = nNumss 504 | name = sprintf('str2double/double(str) (reals), nNums=%d', nNums); 505 | someReals = 1000 * (0.5 - rand([1 nNums])); 506 | realStrs = string(someReals); 507 | realCellstrs = cellstr(realStrs); 508 | 509 | t0 = tic; 510 | for i = 1:nIters 511 | foo = str2double(realCellstrs); 512 | end 513 | teChar = toc(t0); 514 | t0 = tic; 515 | for i = 1:nIters 516 | bar = double(realStrs); 517 | end 518 | teStr = toc(t0); 519 | rsltsBuf = [rsltsBuf; {name, teChar, teStr}]; 520 | end 521 | 522 | end 523 | 524 | 525 | 526 | % Results 527 | 528 | rslts = cell2table(rsltsBuf, 'VariableNames', {'Name', 'CharTime', 'StringTime'}); 529 | nanosPerSec = 1000000000; 530 | rslts.CharNsec = rslts.CharTime * nanosPerSec / nIters; 531 | rslts.StringNsec = rslts.StringTime * nanosPerSec / nIters; 532 | rslts.StringWin = (rslts.CharNsec - rslts.StringNsec) ./ rslts.CharNsec; 533 | rslts = rslts(:,{'Name','CharNsec','StringNsec','StringWin'}); 534 | rslts.Name = categorical(rslts.Name); % for cosmetics 535 | 536 | out.MatlabVer = version; 537 | out.MatlabRelease = version('-release'); 538 | out.SystemInfo = display_system_info; 539 | out.Results = rslts; 540 | 541 | if nargout == 0 542 | % Round for cosmetics 543 | rslts.CharNsec = int64(round(rslts.CharNsec)); 544 | rslts.StringNsec = int64(round(rslts.StringNsec)); 545 | rslts.StringWin = round(rslts.StringWin, 2); 546 | 547 | fprintf('\n'); 548 | fprintf('String vs. char benchmark:\n'); 549 | fprintf('\n'); 550 | fprintf('Matlab R%s on %s\n', out.MatlabRelease, computer); 551 | fprintf('%s\n', out.SystemInfo.OsDescr); 552 | fprintf('%s, %d GB RAM %s\n', out.SystemInfo.CpuDescr, out.SystemInfo.MemSizeGB, ... 553 | out.SystemInfo.SystemExtra); 554 | fprintf('\n'); 555 | disp(rslts); 556 | fprintf('\n'); 557 | 558 | clear out 559 | end 560 | 561 | end 562 | -------------------------------------------------------------------------------- /Mcode/display_system_info.m: -------------------------------------------------------------------------------- 1 | function out = display_system_info 2 | %DISPLAY_SYSTEM_INFO Display info about system this is running on 3 | 4 | % TODO: Detect when running in VM host 5 | 6 | javaProps = javaMethod('getProperties', 'java.lang.System'); 7 | javaVersion = char(javaProps.get('java.version')); 8 | 9 | localhostAddress = javaMethod('getLocalHost', 'java.net.InetAddress'); 10 | hostname = char(localhostAddress.getHostName()); 11 | hostname = regexprep(hostname, '\..*', ''); 12 | osDescr = [char(javaProps.get('os.name')) ' ' char(javaProps.get('os.version'))]; 13 | systemExtra = ''; 14 | 15 | out = struct; 16 | 17 | switch computer 18 | case {'MACI64','MACA64'} 19 | cpuModel = sysctl_prop('machdep.cpu.brand_string'); 20 | nCpuCores = str2double(sysctl_prop('machdep.cpu.core_count')); 21 | %cpuCacheSize = str2double(sysctl_prop('hw.l3cachesize')) / (2^20); 22 | memSizeGB = str2double(sysctl_prop('hw.memsize')) / 2^30; 23 | cpuDescr = sprintf('%s, %d cores', cpuModel, nCpuCores); 24 | case {'PCWIN','PCWIN64'} 25 | cpuDescr = strrep(getenv('PROCESSOR_IDENTIFIER'), ', GenuineIntel', ''); 26 | try 27 | cpuVendorId = winqueryreg('HKEY_LOCAL_MACHINE',... 28 | 'HARDWARE\DESCRIPTION\System\CentralProcessor\0', 'ProcessorNameString'); 29 | cpuDescr = cpuVendorId; 30 | sysName = winqueryreg('HKEY_LOCAL_MACHINE', 'HARDWARE\DESCRIPTION\System\BIOS',... 31 | 'SystemProductName'); 32 | systemExtra = sysName; 33 | catch 34 | % quash 35 | end 36 | w64Arch = getenv('PROCESSOR_ARCHITEW6432'); 37 | if ~isempty(w64Arch) 38 | osDescr = [osDescr ' (WoW64)']; 39 | end 40 | memSizeGB = memsize_using_memory_fcn(); 41 | case {'GLNXA64'} 42 | %TODO: Linux support with procfs 43 | [~,cpuDescr] = system('grep "model name" /proc/cpuinfo | head -1'); 44 | cpuDescr = chomp(regexprep(cpuDescr, '.*?: ', '')); 45 | [~,memSizeDescr] = system('grep "MemTotal" /proc/meminfo | head -1'); 46 | [match,tok] = regexp(memSizeDescr, '(\d+) kB', 'match', 'tokens'); 47 | if ~isempty(match) 48 | memK = str2double(tok{1}{1}); 49 | memSizeGB = memK / 2^10; 50 | else 51 | memSizeGB = NaN; 52 | end 53 | [~,kernelVer] = system('uname -v'); 54 | systemExtra = chomp(kernelVer); 55 | otherwise 56 | % This shouldn't happen, but just in case... 57 | cpuDescr = '???'; 58 | memSizeGB = NaN; 59 | end 60 | 61 | 62 | % Be terse 63 | cpuDescr = strrep(cpuDescr, 'Intel(R) Core(TM) ', 'Core '); 64 | 65 | miscStr = ''; 66 | if isdeployed 67 | miscStr = [miscStr ' DEPLOYED']; 68 | end 69 | %fprintf('Arch: %-8s Release: %-s %s\n', computer, ['R' version('-release')], miscStr); 70 | if is_octave 71 | appName = 'Octave'; 72 | else 73 | appName = 'Matlab'; 74 | end 75 | out.OsDescr = osDescr; 76 | out.CpuDescr = cpuDescr; 77 | out.MemSizeGB = memSizeGB; 78 | out.SystemExtra = systemExtra; 79 | if nargout == 0 80 | fprintf('%s %s on %s %s \n', appName, ['R' version('-release')], computer, miscStr); 81 | fprintf('%s %s / Java %s on %s %s (%s) \n', appName, version, javaVersion,... 82 | computer, osDescr, hostname); 83 | if ~isempty(systemExtra) 84 | systemExtra = sprintf('(%s)', systemExtra); 85 | end 86 | fprintf('Machine: %s, %d GB RAM %s\n', cpuDescr, memSizeGB, systemExtra); 87 | clear out 88 | end 89 | 90 | end 91 | 92 | function out = memsize_using_memory_fcn() 93 | %MEMSIZE_USING_MEMORY_FCN Get memory size using memory() 94 | % 95 | % Only works on platforms that support memory(). OS X does not. 96 | % Returns number of gigabytes as string. 97 | [~,mb] = memory(); 98 | out = mb.PhysicalMemory.Total / 2^30; 99 | end 100 | 101 | function out = chomp(str) 102 | %CHOMP Remove trailing newline from string 103 | out = regexprep(str, '\r?\n$', ''); 104 | end 105 | 106 | function out = sysctl_prop(name) 107 | %SYSCTL_PROP Get a sysctl property (OS X) by name as string 108 | [status,str] = system(['sysctl -n ' name]); 109 | if status ~= 0 110 | warning('Failed getting sysctl property %s: %s', name, str); 111 | out = '???'; 112 | else 113 | out = chomp(str); 114 | end 115 | end 116 | -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/bench_nops_dotNet.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29102.190 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bench_nops_netStandard", "bench_nops_standard\bench_nops_netStandard.csproj", "{24809781-59F9-468B-B6E0-87032C6A4951}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bench_nops_netFw45", "bench_nops_netFw45\bench_nops_netFw45.csproj", "{6C58C21C-AE9B-48FB-AED4-1EFF3DC93B70}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bench_nops_netCore", "bench_nops_netCore\bench_nops_netCore.csproj", "{A4FFAB9C-1E35-4BBA-A87C-F4A69865EE01}" 11 | EndProject 12 | Global 13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 14 | Debug|Any CPU = Debug|Any CPU 15 | Release|Any CPU = Release|Any CPU 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {24809781-59F9-468B-B6E0-87032C6A4951}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 19 | {24809781-59F9-468B-B6E0-87032C6A4951}.Debug|Any CPU.Build.0 = Debug|Any CPU 20 | {24809781-59F9-468B-B6E0-87032C6A4951}.Release|Any CPU.ActiveCfg = Release|Any CPU 21 | {24809781-59F9-468B-B6E0-87032C6A4951}.Release|Any CPU.Build.0 = Release|Any CPU 22 | {6C58C21C-AE9B-48FB-AED4-1EFF3DC93B70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {6C58C21C-AE9B-48FB-AED4-1EFF3DC93B70}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {6C58C21C-AE9B-48FB-AED4-1EFF3DC93B70}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {6C58C21C-AE9B-48FB-AED4-1EFF3DC93B70}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {A4FFAB9C-1E35-4BBA-A87C-F4A69865EE01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {A4FFAB9C-1E35-4BBA-A87C-F4A69865EE01}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {A4FFAB9C-1E35-4BBA-A87C-F4A69865EE01}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {A4FFAB9C-1E35-4BBA-A87C-F4A69865EE01}.Release|Any CPU.Build.0 = Release|Any CPU 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | GlobalSection(ExtensibilityGlobals) = postSolution 35 | SolutionGuid = {A1083B85-DCDA-44C5-9CEE-5AE112A8DA67} 36 | EndGlobalSection 37 | EndGlobal 38 | -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/bench_nops_netCore/DummyNetClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace bench_nops_netCore 4 | { 5 | public class DummyNetClass 6 | { 7 | public void nop() { } 8 | public static void staticNop() { } 9 | public void callNop(int nIters) 10 | { 11 | for (int i = 0; i < nIters; i++) 12 | { 13 | nop(); 14 | } 15 | } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/bench_nops_netCore/bench_nops_netCore.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | ..\build\ 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/bench_nops_netFw45/DummyNetClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace bench_nops_netFw45 8 | { 9 | public class DummyNetClass 10 | { 11 | public void nop() { } 12 | public static void staticNop() { } 13 | public void callNop(int nIters) 14 | { 15 | for (int i = 0; i < nIters; i++) 16 | { 17 | nop(); 18 | } 19 | } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/bench_nops_netFw45/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("bench_nops_netFw45")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("bench_nops_netFw45")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6c58c21c-ae9b-48fb-aed4-1eff3dc93b70")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/bench_nops_netFw45/bench_nops_netFw45.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {6C58C21C-AE9B-48FB-AED4-1EFF3DC93B70} 8 | Library 9 | Properties 10 | bench_nops_netFw45 11 | bench_nops_netFw45 12 | v4.5 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | ..\build\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/bench_nops_standard/DummyNetClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace bench_nops_netStandard 4 | { 5 | 6 | public class DummyNetClass 7 | { 8 | public void nop() { } 9 | public static void staticNop() { } 10 | public void callNop(int nIters) 11 | { 12 | for (int i = 0; i < nIters; i++) 13 | { 14 | nop(); 15 | } 16 | } 17 | 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/bench_nops_standard/bench_nops_netStandard.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | ..\build\ 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/build/bench_nops_netFw45.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/Mcode/dotNet/bench_nops_dotNet/build/bench_nops_netFw45.dll -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/build/bench_nops_netFw45.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/Mcode/dotNet/bench_nops_dotNet/build/bench_nops_netFw45.pdb -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/build/netcoreapp2.1/bench_nops_netCore.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETCoreApp,Version=v2.1", 4 | "signature": "da39a3ee5e6b4b0d3255bfef95601890afd80709" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETCoreApp,Version=v2.1": { 9 | "bench_nops_netCore/1.0.0": { 10 | "runtime": { 11 | "bench_nops_netCore.dll": {} 12 | } 13 | } 14 | } 15 | }, 16 | "libraries": { 17 | "bench_nops_netCore/1.0.0": { 18 | "type": "project", 19 | "serviceable": false, 20 | "sha512": "" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/build/netcoreapp2.1/bench_nops_netCore.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/Mcode/dotNet/bench_nops_dotNet/build/netcoreapp2.1/bench_nops_netCore.dll -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/build/netcoreapp2.1/bench_nops_netCore.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/Mcode/dotNet/bench_nops_dotNet/build/netcoreapp2.1/bench_nops_netCore.pdb -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/build/netstandard2.0/bench_nops_netStandard.deps.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeTarget": { 3 | "name": ".NETStandard,Version=v2.0/", 4 | "signature": "cfe1dc2a80602aef150a12815387068463a61a0d" 5 | }, 6 | "compilationOptions": {}, 7 | "targets": { 8 | ".NETStandard,Version=v2.0": {}, 9 | ".NETStandard,Version=v2.0/": { 10 | "bench_nops_netStandard/1.0.0": { 11 | "dependencies": { 12 | "NETStandard.Library": "2.0.3" 13 | }, 14 | "runtime": { 15 | "bench_nops_netStandard.dll": {} 16 | } 17 | }, 18 | "Microsoft.NETCore.Platforms/1.1.0": {}, 19 | "NETStandard.Library/2.0.3": { 20 | "dependencies": { 21 | "Microsoft.NETCore.Platforms": "1.1.0" 22 | } 23 | } 24 | } 25 | }, 26 | "libraries": { 27 | "bench_nops_netStandard/1.0.0": { 28 | "type": "project", 29 | "serviceable": false, 30 | "sha512": "" 31 | }, 32 | "Microsoft.NETCore.Platforms/1.1.0": { 33 | "type": "package", 34 | "serviceable": true, 35 | "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", 36 | "path": "microsoft.netcore.platforms/1.1.0", 37 | "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" 38 | }, 39 | "NETStandard.Library/2.0.3": { 40 | "type": "package", 41 | "serviceable": true, 42 | "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", 43 | "path": "netstandard.library/2.0.3", 44 | "hashPath": "netstandard.library.2.0.3.nupkg.sha512" 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/build/netstandard2.0/bench_nops_netStandard.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/Mcode/dotNet/bench_nops_dotNet/build/netstandard2.0/bench_nops_netStandard.dll -------------------------------------------------------------------------------- /Mcode/dotNet/bench_nops_dotNet/build/netstandard2.0/bench_nops_netStandard.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/Mcode/dotNet/bench_nops_dotNet/build/netstandard2.0/bench_nops_netStandard.pdb -------------------------------------------------------------------------------- /Mcode/dummymcos.m: -------------------------------------------------------------------------------- 1 | classdef dummymcos 2 | %DUMMYMCOS A dummy new-style (MCOS) class 3 | 4 | %#ok<*MANU> 5 | 6 | properties 7 | foo = []; 8 | propWithGetter = []; 9 | end 10 | 11 | properties (Constant = true) 12 | MY_CONSTANT = []; 13 | end 14 | 15 | methods 16 | function nop(obj) 17 | %NOP No-op method 18 | end 19 | 20 | function call_private_nop(obj, nIters) 21 | for i = 1:nIters 22 | private_nop(obj); 23 | end 24 | end 25 | 26 | function out = get.propWithGetter(obj) 27 | out = obj.propWithGetter; 28 | end 29 | end 30 | 31 | methods (Access = private) 32 | function private_nop(obj) 33 | end 34 | end 35 | 36 | methods (Static = true) 37 | function static_nop() 38 | end 39 | end 40 | 41 | end 42 | -------------------------------------------------------------------------------- /Mcode/is_octave.m: -------------------------------------------------------------------------------- 1 | function out = is_octave 2 | persistent val 3 | if isempty(val) 4 | v = ver; 5 | val = ismember('Octave', {v.Name}); 6 | end 7 | out = val; 8 | end -------------------------------------------------------------------------------- /Mcode/java/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for matlab-bench's main custom Java code 2 | # 3 | # This is a stupid little special-purpose makefile. Don't use this as a model for 4 | # anything else. For Java projects, you should use Ant or Maven instead of Make anyway. 5 | # 6 | # WARNING: You must run this using a Java 8 compiler! Otherwise you'll get too-new 7 | # target class files that won't work under the Java 8 JVM shipped with Matlab 8 | # (R2022a and older, at least). 9 | 10 | .DEFAULT: build 11 | 12 | # BUG: This is busted because it uses options only supported on newer post-8 13 | # javac tools. 14 | .PHONY: build 15 | build: 16 | mkdir -p classes 17 | javac --source 8 --target 8 \ 18 | -d classes --source-path src src/net/apjanke/matlab_bench/bench_nops/DummyJavaClass.java 19 | 20 | # Hack to get it to build with Java 8 javac 21 | .PHONY: build-8 22 | build-8: 23 | mkdir -p classes 24 | javac -d classes src/net/apjanke/matlab_bench/bench_nops/*.java 25 | 26 | .PHONY: rebuild-8 27 | rebuild-8: 28 | make clean && make build-8 && make jar 29 | 30 | .PHONY: jar 31 | jar: classes 32 | rm *.jar 33 | cd classes; jar cf ../matlab-bench-internals.jar * 34 | 35 | .PHONY: clean 36 | clean: 37 | rm -rf classes 38 | -------------------------------------------------------------------------------- /Mcode/java/matlab-bench-internals.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/Mcode/java/matlab-bench-internals.jar -------------------------------------------------------------------------------- /Mcode/java/src/net/apjanke/matlab_bench/bench_nops/DummyJavaClass.java: -------------------------------------------------------------------------------- 1 | package net.apjanke.matlab_bench.bench_nops; 2 | 3 | class DummyJavaClass { 4 | 5 | public DummyJavaClass() { 6 | 7 | } 8 | 9 | public void nop() { 10 | 11 | } 12 | 13 | public static void staticNop() { 14 | 15 | } 16 | 17 | public void callNop(int nIters) { 18 | for (int i=0; i 2 | #include 3 | #include 4 | 5 | void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) 6 | { 7 | 8 | } -------------------------------------------------------------------------------- /Mcode/mexnop.mexa64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/Mcode/mexnop.mexa64 -------------------------------------------------------------------------------- /Mcode/mexnop.mexmaci64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/Mcode/mexnop.mexmaci64 -------------------------------------------------------------------------------- /Mcode/mexnop.mexw32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/Mcode/mexnop.mexw32 -------------------------------------------------------------------------------- /Mcode/mexnop.mexw64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/Mcode/mexnop.mexw64 -------------------------------------------------------------------------------- /Mcode/nop.m: -------------------------------------------------------------------------------- 1 | function nop() 2 | %NOP Plain Matlab function -------------------------------------------------------------------------------- /Mcode/show_result.m: -------------------------------------------------------------------------------- 1 | function show_result(name, nIters, te, isDryRun) 2 | %SHOW_RESULT Show result for one operation style 3 | 4 | if isDryRun 5 | return; 6 | end 7 | usecPerOp = (te * 10^6) / nIters; 8 | %fprintf('%-30s %6.3f %6.3f \n', [name ':'], te, usecPerOp); 9 | fprintf('%-30s %12.3f \n', [name ':'], usecPerOp); 10 | 11 | end 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # matlab-bench 2 | 3 | This is a small collection of utilities for exploring and learning about the behavior of the Matlab interpreter and IDE. 4 | 5 | Each of the tools is in its own subdirectory from which it can be run. 6 | 7 | This is the benchmark used in [the "Is Matlab OOP slow?" Stack Overflow answer](https://stackoverflow.com/questions/1693429/is-matlab-oop-slow-or-am-i-doing-something-wrong#:~:text=The%20short%20answer%20is%3A%20yes,you%20can%20). 8 | 9 | ## Caveats 10 | 11 | The results of these tools are inherently system-dependent, on both your machine configuration and especially the computer hardware you're running. Be careful about extrapolating what you learn from them. 12 | 13 | These tools are not intended for use in production code. The code in this project is not suitable for reuse. It does not define any stable or public APIs. 14 | 15 | ## License 16 | 17 | This software is released under the MIT License. See `LICENSE.txt` for details. 18 | 19 | ## Quick Start 20 | 21 | All the code can be run from within Matlab. 22 | 23 | To benchmark the overhead of function and method calls: 24 | 25 | ```matlab 26 | addpath Mcode 27 | bench_matlab_nops 28 | ``` 29 | 30 | ## Tools 31 | 32 | * `bench_matlab_nops` – Benchmarks the overhead of function calls and basic OO operations. 33 | * `compareStringAndCharOps` – Compare speed of equivalent operations on char and string arrays. 34 | 35 | (All found in the `Mcode/` folder.) 36 | 37 | ## Author 38 | 39 | Andrew Janke: , . 40 | 41 | This is an independent project. It is not affiliated with The MathWorks, creators of Matlab. 42 | 43 | This project is part of the [Janklab](https://janklab.net/) suite of open-source libraries for Matlab. 44 | -------------------------------------------------------------------------------- /comparo/README.md: -------------------------------------------------------------------------------- 1 | # matlab-bench comparo README 2 | 3 | This subtree contains code for comparing the relative performance of different programming languages. 4 | 5 | ## Dir structure 6 | 7 | ### `results/` 8 | 9 | The results database. Results are stored in the format: 10 | 11 | * `results/` 12 | * `/` 13 | * ` - - .json` 14 | 15 | Where: 16 | 17 | * `` is the programming language 18 | * `` is the version of the compiler or the runtime for `` 19 | * For interpreted languages like Matlab or Python, it's the runtime version 20 | * For compiled languages like C++ or Go, it's the compiler version 21 | * `` is the model of CPU running the benchmark 22 | * `` is `Mac`, `Windows`, or `Linux` 23 | 24 | We ignore everything about hardware except for the CPU, assuming OOP overhead is largely CPU-bound. 25 | (God help you if you managed to write a language where method dispatch overhead is RAM-intensive.) 26 | 27 | The JSON files are of the format: 28 | 29 | ```json 30 | { 31 | 'meta' => {a string=>string/number object of some human-readable stuff}, 32 | 'results' => { => } 33 | } 34 | ``` 35 | 36 | Where: 37 | 38 | * `` is an operation code from below, as string 39 | * `` is the average operation time in microseconds 40 | 41 | ### `code/` 42 | 43 | The code directory contains all the language-specific benchmark code, each in a `code/` subdirectory. The compilation and execution process for all the languages is specific to each language; see READMEs in those subdirs for details. 44 | 45 | ### Operations 46 | 47 | These are the operations we measure the execution times of. We try to define them in abstract, language-neutral terms where the operations are either applicable to all languages, or degenerate to natural functional equivalents in the case of languages that don't support these specific things. 48 | 49 | | Code | Description | 50 | | ---------------- | ------------------------------------------------------------ | 51 | | method | Instance method call on an object | 52 | | method_inh_3 | Instance method call, through 3 levels of inheritance | 53 | | prop | Instance property access (get/read) | 54 | | prop_inh_3 | Instance property access, through 3 levels of inheritance | 55 | | static_method | Static method call | 56 | | prop_write | Mutation of a property on an object | 57 | 58 | All operations do no useful work. Any work done inside them is just inserted to prevent the compiler from optimizing the entire operation away and busting our benchmark. 59 | 60 | ## Design Notes 61 | 62 | The whole results database is checked in to the repo, because I want to create a central record that anyone can use to run reports on. I think (and hope) that the results are not so system-dependent that we'd want to support the use case of different people maintaining their different results databases. 63 | -------------------------------------------------------------------------------- /comparo/Reporter.m: -------------------------------------------------------------------------------- 1 | classdef Reporter 2 | 3 | properties 4 | comparoDir 5 | resultsDir 6 | end 7 | 8 | methods 9 | 10 | function this = Reporter() 11 | this.comparoDir = fileparts(mfilename('fullpath')); 12 | this.resultsDir = fullfile(this.comparoDir, 'results'); 13 | end 14 | 15 | function out = readResults(this, cpuId, langs) 16 | nLangs = height(langs); 17 | cpuDir = fullfile(this.resultsDir, cpuId); 18 | out = cell(1, nLangs); 19 | for i = 1:nLangs 20 | want = table2struct(langs(i,:)); 21 | resultsFileBase = sprintf('%s - %s - %s.json', want.lang, want.langVer, want.os); 22 | resultsFile = fullfile(cpuDir, resultsFileBase); 23 | out{i} = jsondecode(fileread(resultsFile)); 24 | end 25 | end 26 | 27 | function out = table_1(this) 28 | cpuId = "Intel W-2150B"; 29 | langs = cell2table({ 30 | "C++" "unknown" "Mac" 31 | "Java" "15" "Mac" 32 | "Python" "3.8.6" "Mac" 33 | "Matlab" "R2020b" "Mac" 34 | }, 'VariableNames',{'lang','langVer','os'}); 35 | tests = cell2table({ 36 | "method" "Method call" 37 | "prop" "Property read" 38 | "prop_write" "Property write" 39 | }, 'VariableNames',{'test','testName'}); 40 | nLangs = height(langs); 41 | nTests = height(tests); 42 | nCols = nLangs + 1; 43 | rslts = this.readResults(cpuId, langs); 44 | 45 | langDescrs = compose("%s %s", langs.lang, langs.langVer); 46 | colNames = ["Operation" langDescrs']; 47 | c = cell(nTests, nCols); 48 | for i = 1:nTests 49 | c{i,1} = tests.testName(i); 50 | for j = 1:nLangs 51 | c{i,j+1} = round(rslts{j}.results.(tests.test(i))); 52 | end 53 | end 54 | out = cell2table(c, 'VariableNames',colNames); 55 | end 56 | 57 | end 58 | 59 | end 60 | -------------------------------------------------------------------------------- /comparo/code/cxx/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /comparo/code/cxx/.idea/cxx.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /comparo/code/cxx/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /comparo/code/cxx/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /comparo/code/cxx/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /comparo/code/cxx/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeCache.txt: -------------------------------------------------------------------------------- 1 | # This is the CMakeCache file. 2 | # For build in directory: /Users/janke/local/repos/matlab-bench/comparo/code/cxx 3 | # It was generated by CMake: /usr/local/Cellar/cmake/3.18.4/bin/cmake 4 | # You can edit this file to change values found and used by cmake. 5 | # If you do not want to change any of the values, simply exit the editor. 6 | # If you do want to change a value, simply edit, save, and exit the editor. 7 | # The syntax for the file is as follows: 8 | # KEY:TYPE=VALUE 9 | # KEY is the name of a variable in the cache. 10 | # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. 11 | # VALUE is the current value for the KEY. 12 | 13 | ######################## 14 | # EXTERNAL cache entries 15 | ######################## 16 | 17 | //Path to a program. 18 | CMAKE_ADDR2LINE:FILEPATH=CMAKE_ADDR2LINE-NOTFOUND 19 | 20 | //Path to a program. 21 | CMAKE_AR:FILEPATH=/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar 22 | 23 | //Choose the type of build, options are: None Debug Release RelWithDebInfo 24 | // MinSizeRel ... 25 | CMAKE_BUILD_TYPE:STRING= 26 | 27 | //Enable/Disable color output during build. 28 | CMAKE_COLOR_MAKEFILE:BOOL=ON 29 | 30 | //CXX compiler 31 | CMAKE_CXX_COMPILER:FILEPATH=/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ 32 | 33 | //Flags used by the CXX compiler during all build types. 34 | CMAKE_CXX_FLAGS:STRING= 35 | 36 | //Flags used by the CXX compiler during DEBUG builds. 37 | CMAKE_CXX_FLAGS_DEBUG:STRING=-g 38 | 39 | //Flags used by the CXX compiler during MINSIZEREL builds. 40 | CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 41 | 42 | //Flags used by the CXX compiler during RELEASE builds. 43 | CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 44 | 45 | //Flags used by the CXX compiler during RELWITHDEBINFO builds. 46 | CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 47 | 48 | //C compiler 49 | CMAKE_C_COMPILER:FILEPATH=/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc 50 | 51 | //Flags used by the C compiler during all build types. 52 | CMAKE_C_FLAGS:STRING= 53 | 54 | //Flags used by the C compiler during DEBUG builds. 55 | CMAKE_C_FLAGS_DEBUG:STRING=-g 56 | 57 | //Flags used by the C compiler during MINSIZEREL builds. 58 | CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 59 | 60 | //Flags used by the C compiler during RELEASE builds. 61 | CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 62 | 63 | //Flags used by the C compiler during RELWITHDEBINFO builds. 64 | CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 65 | 66 | //Path to a program. 67 | CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND 68 | 69 | //Executable file format 70 | CMAKE_EXECUTABLE_FORMAT:STRING=MACHO 71 | 72 | //Flags used by the linker during all build types. 73 | CMAKE_EXE_LINKER_FLAGS:STRING= 74 | 75 | //Flags used by the linker during DEBUG builds. 76 | CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= 77 | 78 | //Flags used by the linker during MINSIZEREL builds. 79 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= 80 | 81 | //Flags used by the linker during RELEASE builds. 82 | CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= 83 | 84 | //Flags used by the linker during RELWITHDEBINFO builds. 85 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 86 | 87 | //Enable/Disable output of compile commands during generation. 88 | CMAKE_EXPORT_COMPILE_COMMANDS:BOOL= 89 | 90 | //Path to a program. 91 | CMAKE_INSTALL_NAME_TOOL:FILEPATH=/usr/bin/install_name_tool 92 | 93 | //Install path prefix, prepended onto install directories. 94 | CMAKE_INSTALL_PREFIX:PATH=/usr/local 95 | 96 | //Path to a program. 97 | CMAKE_LINKER:FILEPATH=/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld 98 | 99 | //Path to a program. 100 | CMAKE_MAKE_PROGRAM:FILEPATH=/usr/local/bin/gmake 101 | 102 | //Flags used by the linker during the creation of modules during 103 | // all build types. 104 | CMAKE_MODULE_LINKER_FLAGS:STRING= 105 | 106 | //Flags used by the linker during the creation of modules during 107 | // DEBUG builds. 108 | CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= 109 | 110 | //Flags used by the linker during the creation of modules during 111 | // MINSIZEREL builds. 112 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= 113 | 114 | //Flags used by the linker during the creation of modules during 115 | // RELEASE builds. 116 | CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= 117 | 118 | //Flags used by the linker during the creation of modules during 119 | // RELWITHDEBINFO builds. 120 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 121 | 122 | //Path to a program. 123 | CMAKE_NM:FILEPATH=/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm 124 | 125 | //Path to a program. 126 | CMAKE_OBJCOPY:FILEPATH=CMAKE_OBJCOPY-NOTFOUND 127 | 128 | //Path to a program. 129 | CMAKE_OBJDUMP:FILEPATH=/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump 130 | 131 | //Build architectures for OSX 132 | CMAKE_OSX_ARCHITECTURES:STRING= 133 | 134 | //Minimum OS X version to target for deployment (at runtime); newer 135 | // APIs weak linked. Set to empty string for default value. 136 | CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.14 137 | 138 | //The product will be built against the headers and libraries located 139 | // inside the indicated SDK. 140 | CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode-11.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk 141 | 142 | //Value Computed by CMake 143 | CMAKE_PROJECT_DESCRIPTION:STATIC= 144 | 145 | //Value Computed by CMake 146 | CMAKE_PROJECT_HOMEPAGE_URL:STATIC= 147 | 148 | //Value Computed by CMake 149 | CMAKE_PROJECT_NAME:STATIC=cxx 150 | 151 | //Path to a program. 152 | CMAKE_RANLIB:FILEPATH=/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib 153 | 154 | //Path to a program. 155 | CMAKE_READELF:FILEPATH=CMAKE_READELF-NOTFOUND 156 | 157 | //Flags used by the linker during the creation of shared libraries 158 | // during all build types. 159 | CMAKE_SHARED_LINKER_FLAGS:STRING= 160 | 161 | //Flags used by the linker during the creation of shared libraries 162 | // during DEBUG builds. 163 | CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= 164 | 165 | //Flags used by the linker during the creation of shared libraries 166 | // during MINSIZEREL builds. 167 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= 168 | 169 | //Flags used by the linker during the creation of shared libraries 170 | // during RELEASE builds. 171 | CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= 172 | 173 | //Flags used by the linker during the creation of shared libraries 174 | // during RELWITHDEBINFO builds. 175 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= 176 | 177 | //If set, runtime paths are not added when installing shared libraries, 178 | // but are added when building. 179 | CMAKE_SKIP_INSTALL_RPATH:BOOL=NO 180 | 181 | //If set, runtime paths are not added when using shared libraries. 182 | CMAKE_SKIP_RPATH:BOOL=NO 183 | 184 | //Flags used by the linker during the creation of static libraries 185 | // during all build types. 186 | CMAKE_STATIC_LINKER_FLAGS:STRING= 187 | 188 | //Flags used by the linker during the creation of static libraries 189 | // during DEBUG builds. 190 | CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= 191 | 192 | //Flags used by the linker during the creation of static libraries 193 | // during MINSIZEREL builds. 194 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= 195 | 196 | //Flags used by the linker during the creation of static libraries 197 | // during RELEASE builds. 198 | CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= 199 | 200 | //Flags used by the linker during the creation of static libraries 201 | // during RELWITHDEBINFO builds. 202 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= 203 | 204 | //Path to a program. 205 | CMAKE_STRIP:FILEPATH=/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip 206 | 207 | //If this value is on, makefiles will be generated without the 208 | // .SILENT directive, and all commands will be echoed to the console 209 | // during the make. This is useful for debugging only. With Visual 210 | // Studio IDE projects all commands are done without /nologo. 211 | CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE 212 | 213 | //Value Computed by CMake 214 | cxx_BINARY_DIR:STATIC=/Users/janke/local/repos/matlab-bench/comparo/code/cxx 215 | 216 | //Value Computed by CMake 217 | cxx_SOURCE_DIR:STATIC=/Users/janke/local/repos/matlab-bench/comparo/code/cxx 218 | 219 | 220 | ######################## 221 | # INTERNAL cache entries 222 | ######################## 223 | 224 | //ADVANCED property for variable: CMAKE_ADDR2LINE 225 | CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 226 | //ADVANCED property for variable: CMAKE_AR 227 | CMAKE_AR-ADVANCED:INTERNAL=1 228 | //This is the directory where this CMakeCache.txt was created 229 | CMAKE_CACHEFILE_DIR:INTERNAL=/Users/janke/local/repos/matlab-bench/comparo/code/cxx 230 | //Major version of cmake used to create the current loaded cache 231 | CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 232 | //Minor version of cmake used to create the current loaded cache 233 | CMAKE_CACHE_MINOR_VERSION:INTERNAL=18 234 | //Patch version of cmake used to create the current loaded cache 235 | CMAKE_CACHE_PATCH_VERSION:INTERNAL=4 236 | //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE 237 | CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 238 | //Path to CMake executable. 239 | CMAKE_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.18.4/bin/cmake 240 | //Path to cpack program executable. 241 | CMAKE_CPACK_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.18.4/bin/cpack 242 | //Path to ctest program executable. 243 | CMAKE_CTEST_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.18.4/bin/ctest 244 | //ADVANCED property for variable: CMAKE_CXX_COMPILER 245 | CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 246 | //ADVANCED property for variable: CMAKE_CXX_FLAGS 247 | CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 248 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG 249 | CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 250 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL 251 | CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 252 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE 253 | CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 254 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO 255 | CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 256 | //ADVANCED property for variable: CMAKE_C_COMPILER 257 | CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 258 | //ADVANCED property for variable: CMAKE_C_FLAGS 259 | CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 260 | //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG 261 | CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 262 | //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL 263 | CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 264 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE 265 | CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 266 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO 267 | CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 268 | //ADVANCED property for variable: CMAKE_DLLTOOL 269 | CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 270 | //Path to cache edit program executable. 271 | CMAKE_EDIT_COMMAND:INTERNAL=/usr/local/Cellar/cmake/3.18.4/bin/ccmake 272 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS 273 | CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 274 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG 275 | CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 276 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL 277 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 278 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE 279 | CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 280 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO 281 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 282 | //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS 283 | CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 284 | //Name of external makefile project generator. 285 | CMAKE_EXTRA_GENERATOR:INTERNAL= 286 | //Name of generator. 287 | CMAKE_GENERATOR:INTERNAL=Unix Makefiles 288 | //Generator instance identifier. 289 | CMAKE_GENERATOR_INSTANCE:INTERNAL= 290 | //Name of generator platform. 291 | CMAKE_GENERATOR_PLATFORM:INTERNAL= 292 | //Name of generator toolset. 293 | CMAKE_GENERATOR_TOOLSET:INTERNAL= 294 | //Source directory with the top level CMakeLists.txt file for this 295 | // project 296 | CMAKE_HOME_DIRECTORY:INTERNAL=/Users/janke/local/repos/matlab-bench/comparo/code/cxx 297 | //ADVANCED property for variable: CMAKE_INSTALL_NAME_TOOL 298 | CMAKE_INSTALL_NAME_TOOL-ADVANCED:INTERNAL=1 299 | //ADVANCED property for variable: CMAKE_LINKER 300 | CMAKE_LINKER-ADVANCED:INTERNAL=1 301 | //ADVANCED property for variable: CMAKE_MAKE_PROGRAM 302 | CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 303 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS 304 | CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 305 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG 306 | CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 307 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL 308 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 309 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE 310 | CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 311 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO 312 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 313 | //ADVANCED property for variable: CMAKE_NM 314 | CMAKE_NM-ADVANCED:INTERNAL=1 315 | //number of local generators 316 | CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 317 | //ADVANCED property for variable: CMAKE_OBJCOPY 318 | CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 319 | //ADVANCED property for variable: CMAKE_OBJDUMP 320 | CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 321 | //Platform information initialized 322 | CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 323 | //ADVANCED property for variable: CMAKE_RANLIB 324 | CMAKE_RANLIB-ADVANCED:INTERNAL=1 325 | //ADVANCED property for variable: CMAKE_READELF 326 | CMAKE_READELF-ADVANCED:INTERNAL=1 327 | //Path to CMake installation. 328 | CMAKE_ROOT:INTERNAL=/usr/local/Cellar/cmake/3.18.4/share/cmake 329 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS 330 | CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 331 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG 332 | CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 333 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL 334 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 335 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE 336 | CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 337 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO 338 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 339 | //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH 340 | CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 341 | //ADVANCED property for variable: CMAKE_SKIP_RPATH 342 | CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 343 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS 344 | CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 345 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG 346 | CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 347 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL 348 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 349 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE 350 | CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 351 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO 352 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 353 | //ADVANCED property for variable: CMAKE_STRIP 354 | CMAKE_STRIP-ADVANCED:INTERNAL=1 355 | //uname command 356 | CMAKE_UNAME:INTERNAL=/usr/bin/uname 357 | //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE 358 | CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 359 | 360 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/3.18.4/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "AppleClang") 4 | set(CMAKE_C_COMPILER_VERSION "11.0.0.11000033") 5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "") 6 | set(CMAKE_C_COMPILER_WRAPPER "") 7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 8 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") 9 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") 10 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") 11 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") 12 | 13 | set(CMAKE_C_PLATFORM_ID "Darwin") 14 | set(CMAKE_C_SIMULATE_ID "") 15 | set(CMAKE_C_COMPILER_FRONTEND_VARIANT "") 16 | set(CMAKE_C_SIMULATE_VERSION "") 17 | 18 | 19 | 20 | 21 | set(CMAKE_AR "/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar") 22 | set(CMAKE_C_COMPILER_AR "") 23 | set(CMAKE_RANLIB "/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib") 24 | set(CMAKE_C_COMPILER_RANLIB "") 25 | set(CMAKE_LINKER "/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld") 26 | set(CMAKE_MT "") 27 | set(CMAKE_COMPILER_IS_GNUCC ) 28 | set(CMAKE_C_COMPILER_LOADED 1) 29 | set(CMAKE_C_COMPILER_WORKS TRUE) 30 | set(CMAKE_C_ABI_COMPILED TRUE) 31 | set(CMAKE_COMPILER_IS_MINGW ) 32 | set(CMAKE_COMPILER_IS_CYGWIN ) 33 | if(CMAKE_COMPILER_IS_CYGWIN) 34 | set(CYGWIN 1) 35 | set(UNIX 1) 36 | endif() 37 | 38 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 39 | 40 | if(CMAKE_COMPILER_IS_MINGW) 41 | set(MINGW 1) 42 | endif() 43 | set(CMAKE_C_COMPILER_ID_RUN 1) 44 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 45 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 46 | set(CMAKE_C_LINKER_PREFERENCE 10) 47 | 48 | # Save compiler ABI information. 49 | set(CMAKE_C_SIZEOF_DATA_PTR "8") 50 | set(CMAKE_C_COMPILER_ABI "") 51 | set(CMAKE_C_LIBRARY_ARCHITECTURE "") 52 | 53 | if(CMAKE_C_SIZEOF_DATA_PTR) 54 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 55 | endif() 56 | 57 | if(CMAKE_C_COMPILER_ABI) 58 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 59 | endif() 60 | 61 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 62 | set(CMAKE_LIBRARY_ARCHITECTURE "") 63 | endif() 64 | 65 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 66 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 67 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 68 | endif() 69 | 70 | 71 | 72 | 73 | 74 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include;/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include;/Applications/Xcode-11.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include") 75 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "") 76 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/Applications/Xcode-11.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib") 77 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Applications/Xcode-11.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks") 78 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/3.18.4/CMakeCXXCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_CXX_COMPILER "/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++") 2 | set(CMAKE_CXX_COMPILER_ARG1 "") 3 | set(CMAKE_CXX_COMPILER_ID "AppleClang") 4 | set(CMAKE_CXX_COMPILER_VERSION "11.0.0.11000033") 5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") 6 | set(CMAKE_CXX_COMPILER_WRAPPER "") 7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98") 8 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20") 9 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") 10 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") 11 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 12 | set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") 13 | set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20") 14 | 15 | set(CMAKE_CXX_PLATFORM_ID "Darwin") 16 | set(CMAKE_CXX_SIMULATE_ID "") 17 | set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "") 18 | set(CMAKE_CXX_SIMULATE_VERSION "") 19 | 20 | 21 | 22 | 23 | set(CMAKE_AR "/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar") 24 | set(CMAKE_CXX_COMPILER_AR "") 25 | set(CMAKE_RANLIB "/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib") 26 | set(CMAKE_CXX_COMPILER_RANLIB "") 27 | set(CMAKE_LINKER "/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld") 28 | set(CMAKE_MT "") 29 | set(CMAKE_COMPILER_IS_GNUCXX ) 30 | set(CMAKE_CXX_COMPILER_LOADED 1) 31 | set(CMAKE_CXX_COMPILER_WORKS TRUE) 32 | set(CMAKE_CXX_ABI_COMPILED TRUE) 33 | set(CMAKE_COMPILER_IS_MINGW ) 34 | set(CMAKE_COMPILER_IS_CYGWIN ) 35 | if(CMAKE_COMPILER_IS_CYGWIN) 36 | set(CYGWIN 1) 37 | set(UNIX 1) 38 | endif() 39 | 40 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") 41 | 42 | if(CMAKE_COMPILER_IS_MINGW) 43 | set(MINGW 1) 44 | endif() 45 | set(CMAKE_CXX_COMPILER_ID_RUN 1) 46 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP) 47 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) 48 | 49 | foreach (lang C OBJC OBJCXX) 50 | if (CMAKE_${lang}_COMPILER_ID_RUN) 51 | foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) 52 | list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) 53 | endforeach() 54 | endif() 55 | endforeach() 56 | 57 | set(CMAKE_CXX_LINKER_PREFERENCE 30) 58 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) 59 | 60 | # Save compiler ABI information. 61 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8") 62 | set(CMAKE_CXX_COMPILER_ABI "") 63 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "") 64 | 65 | if(CMAKE_CXX_SIZEOF_DATA_PTR) 66 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") 67 | endif() 68 | 69 | if(CMAKE_CXX_COMPILER_ABI) 70 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") 71 | endif() 72 | 73 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE) 74 | set(CMAKE_LIBRARY_ARCHITECTURE "") 75 | endif() 76 | 77 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") 78 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) 79 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") 80 | endif() 81 | 82 | 83 | 84 | 85 | 86 | set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1;/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include;/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include;/Applications/Xcode-11.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include") 87 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "c++") 88 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/Applications/Xcode-11.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib") 89 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "/Applications/Xcode-11.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks") 90 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/3.18.4/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/cxx/CMakeFiles/3.18.4/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/3.18.4/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/cxx/CMakeFiles/3.18.4/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/3.18.4/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Darwin-18.7.0") 2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin") 3 | set(CMAKE_HOST_SYSTEM_VERSION "18.7.0") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Darwin-18.7.0") 9 | set(CMAKE_SYSTEM_NAME "Darwin") 10 | set(CMAKE_SYSTEM_VERSION "18.7.0") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/3.18.4/CompilerIdC/CMakeCCompilerId.c: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | # error "A C++ compiler has been selected for C." 3 | #endif 4 | 5 | #if defined(__18CXX) 6 | # define ID_VOID_MAIN 7 | #endif 8 | #if defined(__CLASSIC_C__) 9 | /* cv-qualifiers did not exist in K&R C */ 10 | # define const 11 | # define volatile 12 | #endif 13 | 14 | 15 | /* Version number components: V=Version, R=Revision, P=Patch 16 | Version date components: YYYY=Year, MM=Month, DD=Day */ 17 | 18 | #if defined(__INTEL_COMPILER) || defined(__ICC) 19 | # define COMPILER_ID "Intel" 20 | # if defined(_MSC_VER) 21 | # define SIMULATE_ID "MSVC" 22 | # endif 23 | # if defined(__GNUC__) 24 | # define SIMULATE_ID "GNU" 25 | # endif 26 | /* __INTEL_COMPILER = VRP */ 27 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) 28 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) 29 | # if defined(__INTEL_COMPILER_UPDATE) 30 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) 31 | # else 32 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) 33 | # endif 34 | # if defined(__INTEL_COMPILER_BUILD_DATE) 35 | /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ 36 | # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) 37 | # endif 38 | # if defined(_MSC_VER) 39 | /* _MSC_VER = VVRR */ 40 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 41 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 42 | # endif 43 | # if defined(__GNUC__) 44 | # define SIMULATE_VERSION_MAJOR DEC(__GNUC__) 45 | # elif defined(__GNUG__) 46 | # define SIMULATE_VERSION_MAJOR DEC(__GNUG__) 47 | # endif 48 | # if defined(__GNUC_MINOR__) 49 | # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) 50 | # endif 51 | # if defined(__GNUC_PATCHLEVEL__) 52 | # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 53 | # endif 54 | 55 | #elif defined(__PATHCC__) 56 | # define COMPILER_ID "PathScale" 57 | # define COMPILER_VERSION_MAJOR DEC(__PATHCC__) 58 | # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) 59 | # if defined(__PATHCC_PATCHLEVEL__) 60 | # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) 61 | # endif 62 | 63 | #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) 64 | # define COMPILER_ID "Embarcadero" 65 | # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) 66 | # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) 67 | # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) 68 | 69 | #elif defined(__BORLANDC__) 70 | # define COMPILER_ID "Borland" 71 | /* __BORLANDC__ = 0xVRR */ 72 | # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) 73 | # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) 74 | 75 | #elif defined(__WATCOMC__) && __WATCOMC__ < 1200 76 | # define COMPILER_ID "Watcom" 77 | /* __WATCOMC__ = VVRR */ 78 | # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) 79 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 80 | # if (__WATCOMC__ % 10) > 0 81 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 82 | # endif 83 | 84 | #elif defined(__WATCOMC__) 85 | # define COMPILER_ID "OpenWatcom" 86 | /* __WATCOMC__ = VVRP + 1100 */ 87 | # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) 88 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 89 | # if (__WATCOMC__ % 10) > 0 90 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 91 | # endif 92 | 93 | #elif defined(__SUNPRO_C) 94 | # define COMPILER_ID "SunPro" 95 | # if __SUNPRO_C >= 0x5100 96 | /* __SUNPRO_C = 0xVRRP */ 97 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) 98 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) 99 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) 100 | # else 101 | /* __SUNPRO_CC = 0xVRP */ 102 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) 103 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) 104 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) 105 | # endif 106 | 107 | #elif defined(__HP_cc) 108 | # define COMPILER_ID "HP" 109 | /* __HP_cc = VVRRPP */ 110 | # define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) 111 | # define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) 112 | # define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) 113 | 114 | #elif defined(__DECC) 115 | # define COMPILER_ID "Compaq" 116 | /* __DECC_VER = VVRRTPPPP */ 117 | # define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) 118 | # define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) 119 | # define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) 120 | 121 | #elif defined(__IBMC__) && defined(__COMPILER_VER__) 122 | # define COMPILER_ID "zOS" 123 | /* __IBMC__ = VRP */ 124 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 125 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 126 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 127 | 128 | #elif defined(__ibmxl__) && defined(__clang__) 129 | # define COMPILER_ID "XLClang" 130 | # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 131 | # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 132 | # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 133 | # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 134 | 135 | 136 | #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 137 | # define COMPILER_ID "XL" 138 | /* __IBMC__ = VRP */ 139 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 140 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 141 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 142 | 143 | #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 144 | # define COMPILER_ID "VisualAge" 145 | /* __IBMC__ = VRP */ 146 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 147 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 148 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 149 | 150 | #elif defined(__PGI) 151 | # define COMPILER_ID "PGI" 152 | # define COMPILER_VERSION_MAJOR DEC(__PGIC__) 153 | # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) 154 | # if defined(__PGIC_PATCHLEVEL__) 155 | # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) 156 | # endif 157 | 158 | #elif defined(_CRAYC) 159 | # define COMPILER_ID "Cray" 160 | # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) 161 | # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) 162 | 163 | #elif defined(__TI_COMPILER_VERSION__) 164 | # define COMPILER_ID "TI" 165 | /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ 166 | # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) 167 | # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) 168 | # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) 169 | 170 | #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) 171 | # define COMPILER_ID "Fujitsu" 172 | 173 | #elif defined(__ghs__) 174 | # define COMPILER_ID "GHS" 175 | /* __GHS_VERSION_NUMBER = VVVVRP */ 176 | # ifdef __GHS_VERSION_NUMBER 177 | # define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) 178 | # define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) 179 | # define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) 180 | # endif 181 | 182 | #elif defined(__TINYC__) 183 | # define COMPILER_ID "TinyCC" 184 | 185 | #elif defined(__BCC__) 186 | # define COMPILER_ID "Bruce" 187 | 188 | #elif defined(__SCO_VERSION__) 189 | # define COMPILER_ID "SCO" 190 | 191 | #elif defined(__ARMCC_VERSION) && !defined(__clang__) 192 | # define COMPILER_ID "ARMCC" 193 | #if __ARMCC_VERSION >= 1000000 194 | /* __ARMCC_VERSION = VRRPPPP */ 195 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) 196 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) 197 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 198 | #else 199 | /* __ARMCC_VERSION = VRPPPP */ 200 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) 201 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) 202 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 203 | #endif 204 | 205 | 206 | #elif defined(__clang__) && defined(__apple_build_version__) 207 | # define COMPILER_ID "AppleClang" 208 | # if defined(_MSC_VER) 209 | # define SIMULATE_ID "MSVC" 210 | # endif 211 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 212 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 213 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 214 | # if defined(_MSC_VER) 215 | /* _MSC_VER = VVRR */ 216 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 217 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 218 | # endif 219 | # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) 220 | 221 | #elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) 222 | # define COMPILER_ID "ARMClang" 223 | # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) 224 | # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) 225 | # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) 226 | # define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) 227 | 228 | #elif defined(__clang__) 229 | # define COMPILER_ID "Clang" 230 | # if defined(_MSC_VER) 231 | # define SIMULATE_ID "MSVC" 232 | # endif 233 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 234 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 235 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 236 | # if defined(_MSC_VER) 237 | /* _MSC_VER = VVRR */ 238 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 239 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 240 | # endif 241 | 242 | #elif defined(__GNUC__) 243 | # define COMPILER_ID "GNU" 244 | # define COMPILER_VERSION_MAJOR DEC(__GNUC__) 245 | # if defined(__GNUC_MINOR__) 246 | # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) 247 | # endif 248 | # if defined(__GNUC_PATCHLEVEL__) 249 | # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 250 | # endif 251 | 252 | #elif defined(_MSC_VER) 253 | # define COMPILER_ID "MSVC" 254 | /* _MSC_VER = VVRR */ 255 | # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) 256 | # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) 257 | # if defined(_MSC_FULL_VER) 258 | # if _MSC_VER >= 1400 259 | /* _MSC_FULL_VER = VVRRPPPPP */ 260 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) 261 | # else 262 | /* _MSC_FULL_VER = VVRRPPPP */ 263 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) 264 | # endif 265 | # endif 266 | # if defined(_MSC_BUILD) 267 | # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) 268 | # endif 269 | 270 | #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) 271 | # define COMPILER_ID "ADSP" 272 | #if defined(__VISUALDSPVERSION__) 273 | /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ 274 | # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) 275 | # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) 276 | # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) 277 | #endif 278 | 279 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 280 | # define COMPILER_ID "IAR" 281 | # if defined(__VER__) && defined(__ICCARM__) 282 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) 283 | # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) 284 | # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) 285 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 286 | # elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__)) 287 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) 288 | # define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) 289 | # define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) 290 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 291 | # endif 292 | 293 | #elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) 294 | # define COMPILER_ID "SDCC" 295 | # if defined(__SDCC_VERSION_MAJOR) 296 | # define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) 297 | # define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) 298 | # define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) 299 | # else 300 | /* SDCC = VRP */ 301 | # define COMPILER_VERSION_MAJOR DEC(SDCC/100) 302 | # define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) 303 | # define COMPILER_VERSION_PATCH DEC(SDCC % 10) 304 | # endif 305 | 306 | 307 | /* These compilers are either not known or too old to define an 308 | identification macro. Try to identify the platform and guess that 309 | it is the native compiler. */ 310 | #elif defined(__hpux) || defined(__hpua) 311 | # define COMPILER_ID "HP" 312 | 313 | #else /* unknown compiler */ 314 | # define COMPILER_ID "" 315 | #endif 316 | 317 | /* Construct the string literal in pieces to prevent the source from 318 | getting matched. Store it in a pointer rather than an array 319 | because some compilers will just produce instructions to fill the 320 | array rather than assigning a pointer to a static array. */ 321 | char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; 322 | #ifdef SIMULATE_ID 323 | char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; 324 | #endif 325 | 326 | #ifdef __QNXNTO__ 327 | char const* qnxnto = "INFO" ":" "qnxnto[]"; 328 | #endif 329 | 330 | #if defined(__CRAYXE) || defined(__CRAYXC) 331 | char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; 332 | #endif 333 | 334 | #define STRINGIFY_HELPER(X) #X 335 | #define STRINGIFY(X) STRINGIFY_HELPER(X) 336 | 337 | /* Identify known platforms by name. */ 338 | #if defined(__linux) || defined(__linux__) || defined(linux) 339 | # define PLATFORM_ID "Linux" 340 | 341 | #elif defined(__CYGWIN__) 342 | # define PLATFORM_ID "Cygwin" 343 | 344 | #elif defined(__MINGW32__) 345 | # define PLATFORM_ID "MinGW" 346 | 347 | #elif defined(__APPLE__) 348 | # define PLATFORM_ID "Darwin" 349 | 350 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 351 | # define PLATFORM_ID "Windows" 352 | 353 | #elif defined(__FreeBSD__) || defined(__FreeBSD) 354 | # define PLATFORM_ID "FreeBSD" 355 | 356 | #elif defined(__NetBSD__) || defined(__NetBSD) 357 | # define PLATFORM_ID "NetBSD" 358 | 359 | #elif defined(__OpenBSD__) || defined(__OPENBSD) 360 | # define PLATFORM_ID "OpenBSD" 361 | 362 | #elif defined(__sun) || defined(sun) 363 | # define PLATFORM_ID "SunOS" 364 | 365 | #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) 366 | # define PLATFORM_ID "AIX" 367 | 368 | #elif defined(__hpux) || defined(__hpux__) 369 | # define PLATFORM_ID "HP-UX" 370 | 371 | #elif defined(__HAIKU__) 372 | # define PLATFORM_ID "Haiku" 373 | 374 | #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) 375 | # define PLATFORM_ID "BeOS" 376 | 377 | #elif defined(__QNX__) || defined(__QNXNTO__) 378 | # define PLATFORM_ID "QNX" 379 | 380 | #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) 381 | # define PLATFORM_ID "Tru64" 382 | 383 | #elif defined(__riscos) || defined(__riscos__) 384 | # define PLATFORM_ID "RISCos" 385 | 386 | #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) 387 | # define PLATFORM_ID "SINIX" 388 | 389 | #elif defined(__UNIX_SV__) 390 | # define PLATFORM_ID "UNIX_SV" 391 | 392 | #elif defined(__bsdos__) 393 | # define PLATFORM_ID "BSDOS" 394 | 395 | #elif defined(_MPRAS) || defined(MPRAS) 396 | # define PLATFORM_ID "MP-RAS" 397 | 398 | #elif defined(__osf) || defined(__osf__) 399 | # define PLATFORM_ID "OSF1" 400 | 401 | #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) 402 | # define PLATFORM_ID "SCO_SV" 403 | 404 | #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) 405 | # define PLATFORM_ID "ULTRIX" 406 | 407 | #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) 408 | # define PLATFORM_ID "Xenix" 409 | 410 | #elif defined(__WATCOMC__) 411 | # if defined(__LINUX__) 412 | # define PLATFORM_ID "Linux" 413 | 414 | # elif defined(__DOS__) 415 | # define PLATFORM_ID "DOS" 416 | 417 | # elif defined(__OS2__) 418 | # define PLATFORM_ID "OS2" 419 | 420 | # elif defined(__WINDOWS__) 421 | # define PLATFORM_ID "Windows3x" 422 | 423 | # elif defined(__VXWORKS__) 424 | # define PLATFORM_ID "VxWorks" 425 | 426 | # else /* unknown platform */ 427 | # define PLATFORM_ID 428 | # endif 429 | 430 | #elif defined(__INTEGRITY) 431 | # if defined(INT_178B) 432 | # define PLATFORM_ID "Integrity178" 433 | 434 | # else /* regular Integrity */ 435 | # define PLATFORM_ID "Integrity" 436 | # endif 437 | 438 | #else /* unknown platform */ 439 | # define PLATFORM_ID 440 | 441 | #endif 442 | 443 | /* For windows compilers MSVC and Intel we can determine 444 | the architecture of the compiler being used. This is because 445 | the compilers do not have flags that can change the architecture, 446 | but rather depend on which compiler is being used 447 | */ 448 | #if defined(_WIN32) && defined(_MSC_VER) 449 | # if defined(_M_IA64) 450 | # define ARCHITECTURE_ID "IA64" 451 | 452 | # elif defined(_M_X64) || defined(_M_AMD64) 453 | # define ARCHITECTURE_ID "x64" 454 | 455 | # elif defined(_M_IX86) 456 | # define ARCHITECTURE_ID "X86" 457 | 458 | # elif defined(_M_ARM64) 459 | # define ARCHITECTURE_ID "ARM64" 460 | 461 | # elif defined(_M_ARM) 462 | # if _M_ARM == 4 463 | # define ARCHITECTURE_ID "ARMV4I" 464 | # elif _M_ARM == 5 465 | # define ARCHITECTURE_ID "ARMV5I" 466 | # else 467 | # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) 468 | # endif 469 | 470 | # elif defined(_M_MIPS) 471 | # define ARCHITECTURE_ID "MIPS" 472 | 473 | # elif defined(_M_SH) 474 | # define ARCHITECTURE_ID "SHx" 475 | 476 | # else /* unknown architecture */ 477 | # define ARCHITECTURE_ID "" 478 | # endif 479 | 480 | #elif defined(__WATCOMC__) 481 | # if defined(_M_I86) 482 | # define ARCHITECTURE_ID "I86" 483 | 484 | # elif defined(_M_IX86) 485 | # define ARCHITECTURE_ID "X86" 486 | 487 | # else /* unknown architecture */ 488 | # define ARCHITECTURE_ID "" 489 | # endif 490 | 491 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 492 | # if defined(__ICCARM__) 493 | # define ARCHITECTURE_ID "ARM" 494 | 495 | # elif defined(__ICCRX__) 496 | # define ARCHITECTURE_ID "RX" 497 | 498 | # elif defined(__ICCRH850__) 499 | # define ARCHITECTURE_ID "RH850" 500 | 501 | # elif defined(__ICCRL78__) 502 | # define ARCHITECTURE_ID "RL78" 503 | 504 | # elif defined(__ICCRISCV__) 505 | # define ARCHITECTURE_ID "RISCV" 506 | 507 | # elif defined(__ICCAVR__) 508 | # define ARCHITECTURE_ID "AVR" 509 | 510 | # elif defined(__ICC430__) 511 | # define ARCHITECTURE_ID "MSP430" 512 | 513 | # elif defined(__ICCV850__) 514 | # define ARCHITECTURE_ID "V850" 515 | 516 | # elif defined(__ICC8051__) 517 | # define ARCHITECTURE_ID "8051" 518 | 519 | # else /* unknown architecture */ 520 | # define ARCHITECTURE_ID "" 521 | # endif 522 | 523 | #elif defined(__ghs__) 524 | # if defined(__PPC64__) 525 | # define ARCHITECTURE_ID "PPC64" 526 | 527 | # elif defined(__ppc__) 528 | # define ARCHITECTURE_ID "PPC" 529 | 530 | # elif defined(__ARM__) 531 | # define ARCHITECTURE_ID "ARM" 532 | 533 | # elif defined(__x86_64__) 534 | # define ARCHITECTURE_ID "x64" 535 | 536 | # elif defined(__i386__) 537 | # define ARCHITECTURE_ID "X86" 538 | 539 | # else /* unknown architecture */ 540 | # define ARCHITECTURE_ID "" 541 | # endif 542 | #else 543 | # define ARCHITECTURE_ID 544 | #endif 545 | 546 | /* Convert integer to decimal digit literals. */ 547 | #define DEC(n) \ 548 | ('0' + (((n) / 10000000)%10)), \ 549 | ('0' + (((n) / 1000000)%10)), \ 550 | ('0' + (((n) / 100000)%10)), \ 551 | ('0' + (((n) / 10000)%10)), \ 552 | ('0' + (((n) / 1000)%10)), \ 553 | ('0' + (((n) / 100)%10)), \ 554 | ('0' + (((n) / 10)%10)), \ 555 | ('0' + ((n) % 10)) 556 | 557 | /* Convert integer to hex digit literals. */ 558 | #define HEX(n) \ 559 | ('0' + ((n)>>28 & 0xF)), \ 560 | ('0' + ((n)>>24 & 0xF)), \ 561 | ('0' + ((n)>>20 & 0xF)), \ 562 | ('0' + ((n)>>16 & 0xF)), \ 563 | ('0' + ((n)>>12 & 0xF)), \ 564 | ('0' + ((n)>>8 & 0xF)), \ 565 | ('0' + ((n)>>4 & 0xF)), \ 566 | ('0' + ((n) & 0xF)) 567 | 568 | /* Construct a string literal encoding the version number components. */ 569 | #ifdef COMPILER_VERSION_MAJOR 570 | char const info_version[] = { 571 | 'I', 'N', 'F', 'O', ':', 572 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', 573 | COMPILER_VERSION_MAJOR, 574 | # ifdef COMPILER_VERSION_MINOR 575 | '.', COMPILER_VERSION_MINOR, 576 | # ifdef COMPILER_VERSION_PATCH 577 | '.', COMPILER_VERSION_PATCH, 578 | # ifdef COMPILER_VERSION_TWEAK 579 | '.', COMPILER_VERSION_TWEAK, 580 | # endif 581 | # endif 582 | # endif 583 | ']','\0'}; 584 | #endif 585 | 586 | /* Construct a string literal encoding the internal version number. */ 587 | #ifdef COMPILER_VERSION_INTERNAL 588 | char const info_version_internal[] = { 589 | 'I', 'N', 'F', 'O', ':', 590 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', 591 | 'i','n','t','e','r','n','a','l','[', 592 | COMPILER_VERSION_INTERNAL,']','\0'}; 593 | #endif 594 | 595 | /* Construct a string literal encoding the version number components. */ 596 | #ifdef SIMULATE_VERSION_MAJOR 597 | char const info_simulate_version[] = { 598 | 'I', 'N', 'F', 'O', ':', 599 | 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', 600 | SIMULATE_VERSION_MAJOR, 601 | # ifdef SIMULATE_VERSION_MINOR 602 | '.', SIMULATE_VERSION_MINOR, 603 | # ifdef SIMULATE_VERSION_PATCH 604 | '.', SIMULATE_VERSION_PATCH, 605 | # ifdef SIMULATE_VERSION_TWEAK 606 | '.', SIMULATE_VERSION_TWEAK, 607 | # endif 608 | # endif 609 | # endif 610 | ']','\0'}; 611 | #endif 612 | 613 | /* Construct the string literal in pieces to prevent the source from 614 | getting matched. Store it in a pointer rather than an array 615 | because some compilers will just produce instructions to fill the 616 | array rather than assigning a pointer to a static array. */ 617 | char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; 618 | char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; 619 | 620 | 621 | 622 | 623 | #if !defined(__STDC__) 624 | # if (defined(_MSC_VER) && !defined(__clang__)) \ 625 | || (defined(__ibmxl__) || defined(__IBMC__)) 626 | # define C_DIALECT "90" 627 | # else 628 | # define C_DIALECT 629 | # endif 630 | #elif __STDC_VERSION__ >= 201000L 631 | # define C_DIALECT "11" 632 | #elif __STDC_VERSION__ >= 199901L 633 | # define C_DIALECT "99" 634 | #else 635 | # define C_DIALECT "90" 636 | #endif 637 | const char* info_language_dialect_default = 638 | "INFO" ":" "dialect_default[" C_DIALECT "]"; 639 | 640 | /*--------------------------------------------------------------------------*/ 641 | 642 | #ifdef ID_VOID_MAIN 643 | void main() {} 644 | #else 645 | # if defined(__CLASSIC_C__) 646 | int main(argc, argv) int argc; char *argv[]; 647 | # else 648 | int main(int argc, char* argv[]) 649 | # endif 650 | { 651 | int require = 0; 652 | require += info_compiler[argc]; 653 | require += info_platform[argc]; 654 | require += info_arch[argc]; 655 | #ifdef COMPILER_VERSION_MAJOR 656 | require += info_version[argc]; 657 | #endif 658 | #ifdef COMPILER_VERSION_INTERNAL 659 | require += info_version_internal[argc]; 660 | #endif 661 | #ifdef SIMULATE_ID 662 | require += info_simulate[argc]; 663 | #endif 664 | #ifdef SIMULATE_VERSION_MAJOR 665 | require += info_simulate_version[argc]; 666 | #endif 667 | #if defined(__CRAYXE) || defined(__CRAYXC) 668 | require += info_cray[argc]; 669 | #endif 670 | require += info_language_dialect_default[argc]; 671 | (void)argv; 672 | return require; 673 | } 674 | #endif 675 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/3.18.4/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/cxx/CMakeFiles/3.18.4/CompilerIdC/a.out -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/3.18.4/CompilerIdCXX/CMakeCXXCompilerId.cpp: -------------------------------------------------------------------------------- 1 | /* This source file must have a .cpp extension so that all C++ compilers 2 | recognize the extension without flags. Borland does not know .cxx for 3 | example. */ 4 | #ifndef __cplusplus 5 | # error "A C compiler has been selected for C++." 6 | #endif 7 | 8 | 9 | /* Version number components: V=Version, R=Revision, P=Patch 10 | Version date components: YYYY=Year, MM=Month, DD=Day */ 11 | 12 | #if defined(__COMO__) 13 | # define COMPILER_ID "Comeau" 14 | /* __COMO_VERSION__ = VRR */ 15 | # define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) 16 | # define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) 17 | 18 | #elif defined(__INTEL_COMPILER) || defined(__ICC) 19 | # define COMPILER_ID "Intel" 20 | # if defined(_MSC_VER) 21 | # define SIMULATE_ID "MSVC" 22 | # endif 23 | # if defined(__GNUC__) 24 | # define SIMULATE_ID "GNU" 25 | # endif 26 | /* __INTEL_COMPILER = VRP */ 27 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) 28 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) 29 | # if defined(__INTEL_COMPILER_UPDATE) 30 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) 31 | # else 32 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) 33 | # endif 34 | # if defined(__INTEL_COMPILER_BUILD_DATE) 35 | /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ 36 | # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) 37 | # endif 38 | # if defined(_MSC_VER) 39 | /* _MSC_VER = VVRR */ 40 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 41 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 42 | # endif 43 | # if defined(__GNUC__) 44 | # define SIMULATE_VERSION_MAJOR DEC(__GNUC__) 45 | # elif defined(__GNUG__) 46 | # define SIMULATE_VERSION_MAJOR DEC(__GNUG__) 47 | # endif 48 | # if defined(__GNUC_MINOR__) 49 | # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) 50 | # endif 51 | # if defined(__GNUC_PATCHLEVEL__) 52 | # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 53 | # endif 54 | 55 | #elif defined(__PATHCC__) 56 | # define COMPILER_ID "PathScale" 57 | # define COMPILER_VERSION_MAJOR DEC(__PATHCC__) 58 | # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) 59 | # if defined(__PATHCC_PATCHLEVEL__) 60 | # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) 61 | # endif 62 | 63 | #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) 64 | # define COMPILER_ID "Embarcadero" 65 | # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) 66 | # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) 67 | # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) 68 | 69 | #elif defined(__BORLANDC__) 70 | # define COMPILER_ID "Borland" 71 | /* __BORLANDC__ = 0xVRR */ 72 | # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) 73 | # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) 74 | 75 | #elif defined(__WATCOMC__) && __WATCOMC__ < 1200 76 | # define COMPILER_ID "Watcom" 77 | /* __WATCOMC__ = VVRR */ 78 | # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) 79 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 80 | # if (__WATCOMC__ % 10) > 0 81 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 82 | # endif 83 | 84 | #elif defined(__WATCOMC__) 85 | # define COMPILER_ID "OpenWatcom" 86 | /* __WATCOMC__ = VVRP + 1100 */ 87 | # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) 88 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 89 | # if (__WATCOMC__ % 10) > 0 90 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 91 | # endif 92 | 93 | #elif defined(__SUNPRO_CC) 94 | # define COMPILER_ID "SunPro" 95 | # if __SUNPRO_CC >= 0x5100 96 | /* __SUNPRO_CC = 0xVRRP */ 97 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) 98 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) 99 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 100 | # else 101 | /* __SUNPRO_CC = 0xVRP */ 102 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) 103 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) 104 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 105 | # endif 106 | 107 | #elif defined(__HP_aCC) 108 | # define COMPILER_ID "HP" 109 | /* __HP_aCC = VVRRPP */ 110 | # define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) 111 | # define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) 112 | # define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) 113 | 114 | #elif defined(__DECCXX) 115 | # define COMPILER_ID "Compaq" 116 | /* __DECCXX_VER = VVRRTPPPP */ 117 | # define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) 118 | # define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) 119 | # define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) 120 | 121 | #elif defined(__IBMCPP__) && defined(__COMPILER_VER__) 122 | # define COMPILER_ID "zOS" 123 | /* __IBMCPP__ = VRP */ 124 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 125 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 126 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 127 | 128 | #elif defined(__ibmxl__) && defined(__clang__) 129 | # define COMPILER_ID "XLClang" 130 | # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 131 | # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 132 | # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 133 | # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 134 | 135 | 136 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 137 | # define COMPILER_ID "XL" 138 | /* __IBMCPP__ = VRP */ 139 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 140 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 141 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 142 | 143 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 144 | # define COMPILER_ID "VisualAge" 145 | /* __IBMCPP__ = VRP */ 146 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 147 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 148 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 149 | 150 | #elif defined(__PGI) 151 | # define COMPILER_ID "PGI" 152 | # define COMPILER_VERSION_MAJOR DEC(__PGIC__) 153 | # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) 154 | # if defined(__PGIC_PATCHLEVEL__) 155 | # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) 156 | # endif 157 | 158 | #elif defined(_CRAYC) 159 | # define COMPILER_ID "Cray" 160 | # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) 161 | # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) 162 | 163 | #elif defined(__TI_COMPILER_VERSION__) 164 | # define COMPILER_ID "TI" 165 | /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ 166 | # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) 167 | # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) 168 | # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) 169 | 170 | #elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) 171 | # define COMPILER_ID "Fujitsu" 172 | 173 | #elif defined(__ghs__) 174 | # define COMPILER_ID "GHS" 175 | /* __GHS_VERSION_NUMBER = VVVVRP */ 176 | # ifdef __GHS_VERSION_NUMBER 177 | # define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) 178 | # define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) 179 | # define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) 180 | # endif 181 | 182 | #elif defined(__SCO_VERSION__) 183 | # define COMPILER_ID "SCO" 184 | 185 | #elif defined(__ARMCC_VERSION) && !defined(__clang__) 186 | # define COMPILER_ID "ARMCC" 187 | #if __ARMCC_VERSION >= 1000000 188 | /* __ARMCC_VERSION = VRRPPPP */ 189 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) 190 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) 191 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 192 | #else 193 | /* __ARMCC_VERSION = VRPPPP */ 194 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) 195 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) 196 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 197 | #endif 198 | 199 | 200 | #elif defined(__clang__) && defined(__apple_build_version__) 201 | # define COMPILER_ID "AppleClang" 202 | # if defined(_MSC_VER) 203 | # define SIMULATE_ID "MSVC" 204 | # endif 205 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 206 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 207 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 208 | # if defined(_MSC_VER) 209 | /* _MSC_VER = VVRR */ 210 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 211 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 212 | # endif 213 | # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) 214 | 215 | #elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) 216 | # define COMPILER_ID "ARMClang" 217 | # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) 218 | # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) 219 | # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) 220 | # define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) 221 | 222 | #elif defined(__clang__) 223 | # define COMPILER_ID "Clang" 224 | # if defined(_MSC_VER) 225 | # define SIMULATE_ID "MSVC" 226 | # endif 227 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 228 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 229 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 230 | # if defined(_MSC_VER) 231 | /* _MSC_VER = VVRR */ 232 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 233 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 234 | # endif 235 | 236 | #elif defined(__GNUC__) || defined(__GNUG__) 237 | # define COMPILER_ID "GNU" 238 | # if defined(__GNUC__) 239 | # define COMPILER_VERSION_MAJOR DEC(__GNUC__) 240 | # else 241 | # define COMPILER_VERSION_MAJOR DEC(__GNUG__) 242 | # endif 243 | # if defined(__GNUC_MINOR__) 244 | # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) 245 | # endif 246 | # if defined(__GNUC_PATCHLEVEL__) 247 | # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 248 | # endif 249 | 250 | #elif defined(_MSC_VER) 251 | # define COMPILER_ID "MSVC" 252 | /* _MSC_VER = VVRR */ 253 | # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) 254 | # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) 255 | # if defined(_MSC_FULL_VER) 256 | # if _MSC_VER >= 1400 257 | /* _MSC_FULL_VER = VVRRPPPPP */ 258 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) 259 | # else 260 | /* _MSC_FULL_VER = VVRRPPPP */ 261 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) 262 | # endif 263 | # endif 264 | # if defined(_MSC_BUILD) 265 | # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) 266 | # endif 267 | 268 | #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) 269 | # define COMPILER_ID "ADSP" 270 | #if defined(__VISUALDSPVERSION__) 271 | /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ 272 | # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) 273 | # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) 274 | # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) 275 | #endif 276 | 277 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 278 | # define COMPILER_ID "IAR" 279 | # if defined(__VER__) && defined(__ICCARM__) 280 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) 281 | # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) 282 | # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) 283 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 284 | # elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__)) 285 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) 286 | # define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) 287 | # define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) 288 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 289 | # endif 290 | 291 | 292 | /* These compilers are either not known or too old to define an 293 | identification macro. Try to identify the platform and guess that 294 | it is the native compiler. */ 295 | #elif defined(__hpux) || defined(__hpua) 296 | # define COMPILER_ID "HP" 297 | 298 | #else /* unknown compiler */ 299 | # define COMPILER_ID "" 300 | #endif 301 | 302 | /* Construct the string literal in pieces to prevent the source from 303 | getting matched. Store it in a pointer rather than an array 304 | because some compilers will just produce instructions to fill the 305 | array rather than assigning a pointer to a static array. */ 306 | char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; 307 | #ifdef SIMULATE_ID 308 | char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; 309 | #endif 310 | 311 | #ifdef __QNXNTO__ 312 | char const* qnxnto = "INFO" ":" "qnxnto[]"; 313 | #endif 314 | 315 | #if defined(__CRAYXE) || defined(__CRAYXC) 316 | char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; 317 | #endif 318 | 319 | #define STRINGIFY_HELPER(X) #X 320 | #define STRINGIFY(X) STRINGIFY_HELPER(X) 321 | 322 | /* Identify known platforms by name. */ 323 | #if defined(__linux) || defined(__linux__) || defined(linux) 324 | # define PLATFORM_ID "Linux" 325 | 326 | #elif defined(__CYGWIN__) 327 | # define PLATFORM_ID "Cygwin" 328 | 329 | #elif defined(__MINGW32__) 330 | # define PLATFORM_ID "MinGW" 331 | 332 | #elif defined(__APPLE__) 333 | # define PLATFORM_ID "Darwin" 334 | 335 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 336 | # define PLATFORM_ID "Windows" 337 | 338 | #elif defined(__FreeBSD__) || defined(__FreeBSD) 339 | # define PLATFORM_ID "FreeBSD" 340 | 341 | #elif defined(__NetBSD__) || defined(__NetBSD) 342 | # define PLATFORM_ID "NetBSD" 343 | 344 | #elif defined(__OpenBSD__) || defined(__OPENBSD) 345 | # define PLATFORM_ID "OpenBSD" 346 | 347 | #elif defined(__sun) || defined(sun) 348 | # define PLATFORM_ID "SunOS" 349 | 350 | #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) 351 | # define PLATFORM_ID "AIX" 352 | 353 | #elif defined(__hpux) || defined(__hpux__) 354 | # define PLATFORM_ID "HP-UX" 355 | 356 | #elif defined(__HAIKU__) 357 | # define PLATFORM_ID "Haiku" 358 | 359 | #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) 360 | # define PLATFORM_ID "BeOS" 361 | 362 | #elif defined(__QNX__) || defined(__QNXNTO__) 363 | # define PLATFORM_ID "QNX" 364 | 365 | #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) 366 | # define PLATFORM_ID "Tru64" 367 | 368 | #elif defined(__riscos) || defined(__riscos__) 369 | # define PLATFORM_ID "RISCos" 370 | 371 | #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) 372 | # define PLATFORM_ID "SINIX" 373 | 374 | #elif defined(__UNIX_SV__) 375 | # define PLATFORM_ID "UNIX_SV" 376 | 377 | #elif defined(__bsdos__) 378 | # define PLATFORM_ID "BSDOS" 379 | 380 | #elif defined(_MPRAS) || defined(MPRAS) 381 | # define PLATFORM_ID "MP-RAS" 382 | 383 | #elif defined(__osf) || defined(__osf__) 384 | # define PLATFORM_ID "OSF1" 385 | 386 | #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) 387 | # define PLATFORM_ID "SCO_SV" 388 | 389 | #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) 390 | # define PLATFORM_ID "ULTRIX" 391 | 392 | #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) 393 | # define PLATFORM_ID "Xenix" 394 | 395 | #elif defined(__WATCOMC__) 396 | # if defined(__LINUX__) 397 | # define PLATFORM_ID "Linux" 398 | 399 | # elif defined(__DOS__) 400 | # define PLATFORM_ID "DOS" 401 | 402 | # elif defined(__OS2__) 403 | # define PLATFORM_ID "OS2" 404 | 405 | # elif defined(__WINDOWS__) 406 | # define PLATFORM_ID "Windows3x" 407 | 408 | # elif defined(__VXWORKS__) 409 | # define PLATFORM_ID "VxWorks" 410 | 411 | # else /* unknown platform */ 412 | # define PLATFORM_ID 413 | # endif 414 | 415 | #elif defined(__INTEGRITY) 416 | # if defined(INT_178B) 417 | # define PLATFORM_ID "Integrity178" 418 | 419 | # else /* regular Integrity */ 420 | # define PLATFORM_ID "Integrity" 421 | # endif 422 | 423 | #else /* unknown platform */ 424 | # define PLATFORM_ID 425 | 426 | #endif 427 | 428 | /* For windows compilers MSVC and Intel we can determine 429 | the architecture of the compiler being used. This is because 430 | the compilers do not have flags that can change the architecture, 431 | but rather depend on which compiler is being used 432 | */ 433 | #if defined(_WIN32) && defined(_MSC_VER) 434 | # if defined(_M_IA64) 435 | # define ARCHITECTURE_ID "IA64" 436 | 437 | # elif defined(_M_X64) || defined(_M_AMD64) 438 | # define ARCHITECTURE_ID "x64" 439 | 440 | # elif defined(_M_IX86) 441 | # define ARCHITECTURE_ID "X86" 442 | 443 | # elif defined(_M_ARM64) 444 | # define ARCHITECTURE_ID "ARM64" 445 | 446 | # elif defined(_M_ARM) 447 | # if _M_ARM == 4 448 | # define ARCHITECTURE_ID "ARMV4I" 449 | # elif _M_ARM == 5 450 | # define ARCHITECTURE_ID "ARMV5I" 451 | # else 452 | # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) 453 | # endif 454 | 455 | # elif defined(_M_MIPS) 456 | # define ARCHITECTURE_ID "MIPS" 457 | 458 | # elif defined(_M_SH) 459 | # define ARCHITECTURE_ID "SHx" 460 | 461 | # else /* unknown architecture */ 462 | # define ARCHITECTURE_ID "" 463 | # endif 464 | 465 | #elif defined(__WATCOMC__) 466 | # if defined(_M_I86) 467 | # define ARCHITECTURE_ID "I86" 468 | 469 | # elif defined(_M_IX86) 470 | # define ARCHITECTURE_ID "X86" 471 | 472 | # else /* unknown architecture */ 473 | # define ARCHITECTURE_ID "" 474 | # endif 475 | 476 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 477 | # if defined(__ICCARM__) 478 | # define ARCHITECTURE_ID "ARM" 479 | 480 | # elif defined(__ICCRX__) 481 | # define ARCHITECTURE_ID "RX" 482 | 483 | # elif defined(__ICCRH850__) 484 | # define ARCHITECTURE_ID "RH850" 485 | 486 | # elif defined(__ICCRL78__) 487 | # define ARCHITECTURE_ID "RL78" 488 | 489 | # elif defined(__ICCRISCV__) 490 | # define ARCHITECTURE_ID "RISCV" 491 | 492 | # elif defined(__ICCAVR__) 493 | # define ARCHITECTURE_ID "AVR" 494 | 495 | # elif defined(__ICC430__) 496 | # define ARCHITECTURE_ID "MSP430" 497 | 498 | # elif defined(__ICCV850__) 499 | # define ARCHITECTURE_ID "V850" 500 | 501 | # elif defined(__ICC8051__) 502 | # define ARCHITECTURE_ID "8051" 503 | 504 | # else /* unknown architecture */ 505 | # define ARCHITECTURE_ID "" 506 | # endif 507 | 508 | #elif defined(__ghs__) 509 | # if defined(__PPC64__) 510 | # define ARCHITECTURE_ID "PPC64" 511 | 512 | # elif defined(__ppc__) 513 | # define ARCHITECTURE_ID "PPC" 514 | 515 | # elif defined(__ARM__) 516 | # define ARCHITECTURE_ID "ARM" 517 | 518 | # elif defined(__x86_64__) 519 | # define ARCHITECTURE_ID "x64" 520 | 521 | # elif defined(__i386__) 522 | # define ARCHITECTURE_ID "X86" 523 | 524 | # else /* unknown architecture */ 525 | # define ARCHITECTURE_ID "" 526 | # endif 527 | #else 528 | # define ARCHITECTURE_ID 529 | #endif 530 | 531 | /* Convert integer to decimal digit literals. */ 532 | #define DEC(n) \ 533 | ('0' + (((n) / 10000000)%10)), \ 534 | ('0' + (((n) / 1000000)%10)), \ 535 | ('0' + (((n) / 100000)%10)), \ 536 | ('0' + (((n) / 10000)%10)), \ 537 | ('0' + (((n) / 1000)%10)), \ 538 | ('0' + (((n) / 100)%10)), \ 539 | ('0' + (((n) / 10)%10)), \ 540 | ('0' + ((n) % 10)) 541 | 542 | /* Convert integer to hex digit literals. */ 543 | #define HEX(n) \ 544 | ('0' + ((n)>>28 & 0xF)), \ 545 | ('0' + ((n)>>24 & 0xF)), \ 546 | ('0' + ((n)>>20 & 0xF)), \ 547 | ('0' + ((n)>>16 & 0xF)), \ 548 | ('0' + ((n)>>12 & 0xF)), \ 549 | ('0' + ((n)>>8 & 0xF)), \ 550 | ('0' + ((n)>>4 & 0xF)), \ 551 | ('0' + ((n) & 0xF)) 552 | 553 | /* Construct a string literal encoding the version number components. */ 554 | #ifdef COMPILER_VERSION_MAJOR 555 | char const info_version[] = { 556 | 'I', 'N', 'F', 'O', ':', 557 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', 558 | COMPILER_VERSION_MAJOR, 559 | # ifdef COMPILER_VERSION_MINOR 560 | '.', COMPILER_VERSION_MINOR, 561 | # ifdef COMPILER_VERSION_PATCH 562 | '.', COMPILER_VERSION_PATCH, 563 | # ifdef COMPILER_VERSION_TWEAK 564 | '.', COMPILER_VERSION_TWEAK, 565 | # endif 566 | # endif 567 | # endif 568 | ']','\0'}; 569 | #endif 570 | 571 | /* Construct a string literal encoding the internal version number. */ 572 | #ifdef COMPILER_VERSION_INTERNAL 573 | char const info_version_internal[] = { 574 | 'I', 'N', 'F', 'O', ':', 575 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', 576 | 'i','n','t','e','r','n','a','l','[', 577 | COMPILER_VERSION_INTERNAL,']','\0'}; 578 | #endif 579 | 580 | /* Construct a string literal encoding the version number components. */ 581 | #ifdef SIMULATE_VERSION_MAJOR 582 | char const info_simulate_version[] = { 583 | 'I', 'N', 'F', 'O', ':', 584 | 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', 585 | SIMULATE_VERSION_MAJOR, 586 | # ifdef SIMULATE_VERSION_MINOR 587 | '.', SIMULATE_VERSION_MINOR, 588 | # ifdef SIMULATE_VERSION_PATCH 589 | '.', SIMULATE_VERSION_PATCH, 590 | # ifdef SIMULATE_VERSION_TWEAK 591 | '.', SIMULATE_VERSION_TWEAK, 592 | # endif 593 | # endif 594 | # endif 595 | ']','\0'}; 596 | #endif 597 | 598 | /* Construct the string literal in pieces to prevent the source from 599 | getting matched. Store it in a pointer rather than an array 600 | because some compilers will just produce instructions to fill the 601 | array rather than assigning a pointer to a static array. */ 602 | char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; 603 | char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; 604 | 605 | 606 | 607 | 608 | #if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L 609 | # if defined(__INTEL_CXX11_MODE__) 610 | # if defined(__cpp_aggregate_nsdmi) 611 | # define CXX_STD 201402L 612 | # else 613 | # define CXX_STD 201103L 614 | # endif 615 | # else 616 | # define CXX_STD 199711L 617 | # endif 618 | #elif defined(_MSC_VER) && defined(_MSVC_LANG) 619 | # define CXX_STD _MSVC_LANG 620 | #else 621 | # define CXX_STD __cplusplus 622 | #endif 623 | 624 | const char* info_language_dialect_default = "INFO" ":" "dialect_default[" 625 | #if CXX_STD > 201703L 626 | "20" 627 | #elif CXX_STD >= 201703L 628 | "17" 629 | #elif CXX_STD >= 201402L 630 | "14" 631 | #elif CXX_STD >= 201103L 632 | "11" 633 | #else 634 | "98" 635 | #endif 636 | "]"; 637 | 638 | /*--------------------------------------------------------------------------*/ 639 | 640 | int main(int argc, char* argv[]) 641 | { 642 | int require = 0; 643 | require += info_compiler[argc]; 644 | require += info_platform[argc]; 645 | #ifdef COMPILER_VERSION_MAJOR 646 | require += info_version[argc]; 647 | #endif 648 | #ifdef COMPILER_VERSION_INTERNAL 649 | require += info_version_internal[argc]; 650 | #endif 651 | #ifdef SIMULATE_ID 652 | require += info_simulate[argc]; 653 | #endif 654 | #ifdef SIMULATE_VERSION_MAJOR 655 | require += info_simulate_version[argc]; 656 | #endif 657 | #if defined(__CRAYXE) || defined(__CRAYXC) 658 | require += info_cray[argc]; 659 | #endif 660 | require += info_language_dialect_default[argc]; 661 | (void)argv; 662 | return require; 663 | } 664 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/3.18.4/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/cxx/CMakeFiles/3.18.4/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.18 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/janke/local/repos/matlab-bench/comparo/code/cxx") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/janke/local/repos/matlab-bench/comparo/code/cxx") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.18 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "CMakeFiles/3.18.4/CMakeCCompiler.cmake" 11 | "CMakeFiles/3.18.4/CMakeCXXCompiler.cmake" 12 | "CMakeFiles/3.18.4/CMakeSystem.cmake" 13 | "CMakeLists.txt" 14 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/CMakeCInformation.cmake" 15 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/CMakeCXXInformation.cmake" 16 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake" 17 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/CMakeCommonLanguageInclude.cmake" 18 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/CMakeGenericSystem.cmake" 19 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/CMakeInitializeConfigs.cmake" 20 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/CMakeLanguageInformation.cmake" 21 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/CMakeSystemSpecificInformation.cmake" 22 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake" 23 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Compiler/AppleClang-C.cmake" 24 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Compiler/AppleClang-CXX.cmake" 25 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Compiler/CMakeCommonCompilerMacros.cmake" 26 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Compiler/Clang.cmake" 27 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Compiler/GNU.cmake" 28 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Internal/CMakeCheckCompilerFlag.cmake" 29 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Platform/Apple-AppleClang-C.cmake" 30 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Platform/Apple-AppleClang-CXX.cmake" 31 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Platform/Apple-Clang-C.cmake" 32 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Platform/Apple-Clang-CXX.cmake" 33 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Platform/Apple-Clang.cmake" 34 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Platform/Darwin-Initialize.cmake" 35 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Platform/Darwin.cmake" 36 | "/usr/local/Cellar/cmake/3.18.4/share/cmake/Modules/Platform/UnixPaths.cmake" 37 | ) 38 | 39 | # The corresponding makefile is: 40 | set(CMAKE_MAKEFILE_OUTPUTS 41 | "Makefile" 42 | "CMakeFiles/cmake.check_cache" 43 | ) 44 | 45 | # Byproducts of CMake generate step: 46 | set(CMAKE_MAKEFILE_PRODUCTS 47 | "CMakeFiles/CMakeDirectoryInformation.cmake" 48 | ) 49 | 50 | # Dependency information for all targets: 51 | set(CMAKE_DEPEND_INFO_FILES 52 | "CMakeFiles/cxx.dir/DependInfo.cmake" 53 | ) 54 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/Makefile2: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.18 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | #============================================================================= 10 | # Special targets provided by cmake. 11 | 12 | # Disable implicit rules so canonical targets will work. 13 | .SUFFIXES: 14 | 15 | 16 | # Disable VCS-based implicit rules. 17 | % : %,v 18 | 19 | 20 | # Disable VCS-based implicit rules. 21 | % : RCS/% 22 | 23 | 24 | # Disable VCS-based implicit rules. 25 | % : RCS/%,v 26 | 27 | 28 | # Disable VCS-based implicit rules. 29 | % : SCCS/s.% 30 | 31 | 32 | # Disable VCS-based implicit rules. 33 | % : s.% 34 | 35 | 36 | .SUFFIXES: .hpux_make_needs_suffix_list 37 | 38 | 39 | # Command-line flag to silence nested $(MAKE). 40 | $(VERBOSE)MAKESILENT = -s 41 | 42 | #Suppress display of executed commands. 43 | $(VERBOSE).SILENT: 44 | 45 | # A target that is always out of date. 46 | cmake_force: 47 | 48 | .PHONY : cmake_force 49 | 50 | #============================================================================= 51 | # Set environment variables for the build. 52 | 53 | # The shell in which to execute make rules. 54 | SHELL = /bin/sh 55 | 56 | # The CMake executable. 57 | CMAKE_COMMAND = /usr/local/Cellar/cmake/3.18.4/bin/cmake 58 | 59 | # The command to remove a file. 60 | RM = /usr/local/Cellar/cmake/3.18.4/bin/cmake -E rm -f 61 | 62 | # Escaping for special characters. 63 | EQUALS = = 64 | 65 | # The top-level source directory on which CMake was run. 66 | CMAKE_SOURCE_DIR = /Users/janke/local/repos/matlab-bench/comparo/code/cxx 67 | 68 | # The top-level build directory on which CMake was run. 69 | CMAKE_BINARY_DIR = /Users/janke/local/repos/matlab-bench/comparo/code/cxx 70 | 71 | #============================================================================= 72 | # Directory level rules for the build root directory 73 | 74 | # The main recursive "all" target. 75 | all: CMakeFiles/cxx.dir/all 76 | 77 | .PHONY : all 78 | 79 | # The main recursive "preinstall" target. 80 | preinstall: 81 | 82 | .PHONY : preinstall 83 | 84 | # The main recursive "clean" target. 85 | clean: CMakeFiles/cxx.dir/clean 86 | 87 | .PHONY : clean 88 | 89 | #============================================================================= 90 | # Target rules for target CMakeFiles/cxx.dir 91 | 92 | # All Build rule for target. 93 | CMakeFiles/cxx.dir/all: 94 | $(MAKE) $(MAKESILENT) -f CMakeFiles/cxx.dir/build.make CMakeFiles/cxx.dir/depend 95 | $(MAKE) $(MAKESILENT) -f CMakeFiles/cxx.dir/build.make CMakeFiles/cxx.dir/build 96 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles --progress-num=1,2 "Built target cxx" 97 | .PHONY : CMakeFiles/cxx.dir/all 98 | 99 | # Build rule for subdir invocation for target. 100 | CMakeFiles/cxx.dir/rule: cmake_check_build_system 101 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles 2 102 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/cxx.dir/all 103 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles 0 104 | .PHONY : CMakeFiles/cxx.dir/rule 105 | 106 | # Convenience name for target. 107 | cxx: CMakeFiles/cxx.dir/rule 108 | 109 | .PHONY : cxx 110 | 111 | # clean rule for target. 112 | CMakeFiles/cxx.dir/clean: 113 | $(MAKE) $(MAKESILENT) -f CMakeFiles/cxx.dir/build.make CMakeFiles/cxx.dir/clean 114 | .PHONY : CMakeFiles/cxx.dir/clean 115 | 116 | #============================================================================= 117 | # Special targets to cleanup operation of make. 118 | 119 | # Special rule to run CMake to check the build system integrity. 120 | # No rule that depends on this can have commands that come from listfiles 121 | # because they might be regenerated. 122 | cmake_check_build_system: 123 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 124 | .PHONY : cmake_check_build_system 125 | 126 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles/rebuild_cache.dir 2 | /Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles/edit_cache.dir 3 | /Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles/cxx.dir 4 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/cxx.dir/CXX.includecache: -------------------------------------------------------------------------------- 1 | #IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">]) 2 | 3 | #IncludeRegexScan: ^.*$ 4 | 5 | #IncludeRegexComplain: ^$ 6 | 7 | #IncludeRegexTransform: 8 | 9 | /Users/janke/local/repos/matlab-bench/comparo/code/cxx/main.cpp 10 | chrono 11 | - 12 | fstream 13 | - 14 | iostream 15 | - 16 | 17 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/cxx.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/Users/janke/local/repos/matlab-bench/comparo/code/cxx/main.cpp" "/Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles/cxx.dir/main.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "AppleClang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | ) 14 | 15 | # Targets to which this target links. 16 | set(CMAKE_TARGET_LINKED_INFO_FILES 17 | ) 18 | 19 | # Fortran module output directory. 20 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 21 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/cxx.dir/build.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.18 3 | 4 | # Delete rule output on recipe failure. 5 | .DELETE_ON_ERROR: 6 | 7 | 8 | #============================================================================= 9 | # Special targets provided by cmake. 10 | 11 | # Disable implicit rules so canonical targets will work. 12 | .SUFFIXES: 13 | 14 | 15 | # Disable VCS-based implicit rules. 16 | % : %,v 17 | 18 | 19 | # Disable VCS-based implicit rules. 20 | % : RCS/% 21 | 22 | 23 | # Disable VCS-based implicit rules. 24 | % : RCS/%,v 25 | 26 | 27 | # Disable VCS-based implicit rules. 28 | % : SCCS/s.% 29 | 30 | 31 | # Disable VCS-based implicit rules. 32 | % : s.% 33 | 34 | 35 | .SUFFIXES: .hpux_make_needs_suffix_list 36 | 37 | 38 | # Command-line flag to silence nested $(MAKE). 39 | $(VERBOSE)MAKESILENT = -s 40 | 41 | #Suppress display of executed commands. 42 | $(VERBOSE).SILENT: 43 | 44 | # A target that is always out of date. 45 | cmake_force: 46 | 47 | .PHONY : cmake_force 48 | 49 | #============================================================================= 50 | # Set environment variables for the build. 51 | 52 | # The shell in which to execute make rules. 53 | SHELL = /bin/sh 54 | 55 | # The CMake executable. 56 | CMAKE_COMMAND = /usr/local/Cellar/cmake/3.18.4/bin/cmake 57 | 58 | # The command to remove a file. 59 | RM = /usr/local/Cellar/cmake/3.18.4/bin/cmake -E rm -f 60 | 61 | # Escaping for special characters. 62 | EQUALS = = 63 | 64 | # The top-level source directory on which CMake was run. 65 | CMAKE_SOURCE_DIR = /Users/janke/local/repos/matlab-bench/comparo/code/cxx 66 | 67 | # The top-level build directory on which CMake was run. 68 | CMAKE_BINARY_DIR = /Users/janke/local/repos/matlab-bench/comparo/code/cxx 69 | 70 | # Include any dependencies generated for this target. 71 | include CMakeFiles/cxx.dir/depend.make 72 | 73 | # Include the progress variables for this target. 74 | include CMakeFiles/cxx.dir/progress.make 75 | 76 | # Include the compile flags for this target's objects. 77 | include CMakeFiles/cxx.dir/flags.make 78 | 79 | CMakeFiles/cxx.dir/main.cpp.o: CMakeFiles/cxx.dir/flags.make 80 | CMakeFiles/cxx.dir/main.cpp.o: main.cpp 81 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/cxx.dir/main.cpp.o" 82 | /Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/cxx.dir/main.cpp.o -c /Users/janke/local/repos/matlab-bench/comparo/code/cxx/main.cpp 83 | 84 | CMakeFiles/cxx.dir/main.cpp.i: cmake_force 85 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/cxx.dir/main.cpp.i" 86 | /Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /Users/janke/local/repos/matlab-bench/comparo/code/cxx/main.cpp > CMakeFiles/cxx.dir/main.cpp.i 87 | 88 | CMakeFiles/cxx.dir/main.cpp.s: cmake_force 89 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/cxx.dir/main.cpp.s" 90 | /Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /Users/janke/local/repos/matlab-bench/comparo/code/cxx/main.cpp -o CMakeFiles/cxx.dir/main.cpp.s 91 | 92 | # Object files for target cxx 93 | cxx_OBJECTS = \ 94 | "CMakeFiles/cxx.dir/main.cpp.o" 95 | 96 | # External object files for target cxx 97 | cxx_EXTERNAL_OBJECTS = 98 | 99 | cxx: CMakeFiles/cxx.dir/main.cpp.o 100 | cxx: CMakeFiles/cxx.dir/build.make 101 | cxx: CMakeFiles/cxx.dir/link.txt 102 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable cxx" 103 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/cxx.dir/link.txt --verbose=$(VERBOSE) 104 | 105 | # Rule to build all files generated by this target. 106 | CMakeFiles/cxx.dir/build: cxx 107 | 108 | .PHONY : CMakeFiles/cxx.dir/build 109 | 110 | CMakeFiles/cxx.dir/clean: 111 | $(CMAKE_COMMAND) -P CMakeFiles/cxx.dir/cmake_clean.cmake 112 | .PHONY : CMakeFiles/cxx.dir/clean 113 | 114 | CMakeFiles/cxx.dir/depend: 115 | cd /Users/janke/local/repos/matlab-bench/comparo/code/cxx && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /Users/janke/local/repos/matlab-bench/comparo/code/cxx /Users/janke/local/repos/matlab-bench/comparo/code/cxx /Users/janke/local/repos/matlab-bench/comparo/code/cxx /Users/janke/local/repos/matlab-bench/comparo/code/cxx /Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles/cxx.dir/DependInfo.cmake --color=$(COLOR) 116 | .PHONY : CMakeFiles/cxx.dir/depend 117 | 118 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/cxx.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/cxx.dir/main.cpp.o" 3 | "cxx" 4 | "cxx.pdb" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/cxx.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/cxx.dir/depend.internal: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.18 3 | 4 | CMakeFiles/cxx.dir/main.cpp.o 5 | /Users/janke/local/repos/matlab-bench/comparo/code/cxx/main.cpp 6 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/cxx.dir/depend.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.18 3 | 4 | CMakeFiles/cxx.dir/main.cpp.o: main.cpp 5 | 6 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/cxx.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.18 3 | 4 | # compile CXX with /Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ 5 | CXX_DEFINES = 6 | 7 | CXX_INCLUDES = 8 | 9 | CXX_FLAGS = -isysroot /Applications/Xcode-11.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -std=gnu++2a 10 | 11 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/cxx.dir/link.txt: -------------------------------------------------------------------------------- 1 | /Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -isysroot /Applications/Xcode-11.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cxx.dir/main.cpp.o -o cxx 2 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/cxx.dir/main.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/cxx/CMakeFiles/cxx.dir/main.cpp.o -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/cxx.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | 4 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /comparo/code/cxx/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.17) 2 | project(cxx) 3 | 4 | set(CMAKE_CXX_STANDARD 20) 5 | 6 | add_executable(cxx main.cpp) 7 | -------------------------------------------------------------------------------- /comparo/code/cxx/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.18 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | 7 | .PHONY : default_target 8 | 9 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 10 | .NOTPARALLEL: 11 | 12 | 13 | #============================================================================= 14 | # Special targets provided by cmake. 15 | 16 | # Disable implicit rules so canonical targets will work. 17 | .SUFFIXES: 18 | 19 | 20 | # Disable VCS-based implicit rules. 21 | % : %,v 22 | 23 | 24 | # Disable VCS-based implicit rules. 25 | % : RCS/% 26 | 27 | 28 | # Disable VCS-based implicit rules. 29 | % : RCS/%,v 30 | 31 | 32 | # Disable VCS-based implicit rules. 33 | % : SCCS/s.% 34 | 35 | 36 | # Disable VCS-based implicit rules. 37 | % : s.% 38 | 39 | 40 | .SUFFIXES: .hpux_make_needs_suffix_list 41 | 42 | 43 | # Command-line flag to silence nested $(MAKE). 44 | $(VERBOSE)MAKESILENT = -s 45 | 46 | #Suppress display of executed commands. 47 | $(VERBOSE).SILENT: 48 | 49 | # A target that is always out of date. 50 | cmake_force: 51 | 52 | .PHONY : cmake_force 53 | 54 | #============================================================================= 55 | # Set environment variables for the build. 56 | 57 | # The shell in which to execute make rules. 58 | SHELL = /bin/sh 59 | 60 | # The CMake executable. 61 | CMAKE_COMMAND = /usr/local/Cellar/cmake/3.18.4/bin/cmake 62 | 63 | # The command to remove a file. 64 | RM = /usr/local/Cellar/cmake/3.18.4/bin/cmake -E rm -f 65 | 66 | # Escaping for special characters. 67 | EQUALS = = 68 | 69 | # The top-level source directory on which CMake was run. 70 | CMAKE_SOURCE_DIR = /Users/janke/local/repos/matlab-bench/comparo/code/cxx 71 | 72 | # The top-level build directory on which CMake was run. 73 | CMAKE_BINARY_DIR = /Users/janke/local/repos/matlab-bench/comparo/code/cxx 74 | 75 | #============================================================================= 76 | # Targets provided globally by CMake. 77 | 78 | # Special rule for the target rebuild_cache 79 | rebuild_cache: 80 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 81 | /usr/local/Cellar/cmake/3.18.4/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 82 | .PHONY : rebuild_cache 83 | 84 | # Special rule for the target rebuild_cache 85 | rebuild_cache/fast: rebuild_cache 86 | 87 | .PHONY : rebuild_cache/fast 88 | 89 | # Special rule for the target edit_cache 90 | edit_cache: 91 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." 92 | /usr/local/Cellar/cmake/3.18.4/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 93 | .PHONY : edit_cache 94 | 95 | # Special rule for the target edit_cache 96 | edit_cache/fast: edit_cache 97 | 98 | .PHONY : edit_cache/fast 99 | 100 | # The main all target 101 | all: cmake_check_build_system 102 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles /Users/janke/local/repos/matlab-bench/comparo/code/cxx//CMakeFiles/progress.marks 103 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all 104 | $(CMAKE_COMMAND) -E cmake_progress_start /Users/janke/local/repos/matlab-bench/comparo/code/cxx/CMakeFiles 0 105 | .PHONY : all 106 | 107 | # The main clean target 108 | clean: 109 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean 110 | .PHONY : clean 111 | 112 | # The main clean target 113 | clean/fast: clean 114 | 115 | .PHONY : clean/fast 116 | 117 | # Prepare targets for installation. 118 | preinstall: all 119 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall 120 | .PHONY : preinstall 121 | 122 | # Prepare targets for installation. 123 | preinstall/fast: 124 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall 125 | .PHONY : preinstall/fast 126 | 127 | # clear depends 128 | depend: 129 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 130 | .PHONY : depend 131 | 132 | #============================================================================= 133 | # Target rules for targets named cxx 134 | 135 | # Build rule for target. 136 | cxx: cmake_check_build_system 137 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 cxx 138 | .PHONY : cxx 139 | 140 | # fast build rule for target. 141 | cxx/fast: 142 | $(MAKE) $(MAKESILENT) -f CMakeFiles/cxx.dir/build.make CMakeFiles/cxx.dir/build 143 | .PHONY : cxx/fast 144 | 145 | main.o: main.cpp.o 146 | 147 | .PHONY : main.o 148 | 149 | # target to build an object file 150 | main.cpp.o: 151 | $(MAKE) $(MAKESILENT) -f CMakeFiles/cxx.dir/build.make CMakeFiles/cxx.dir/main.cpp.o 152 | .PHONY : main.cpp.o 153 | 154 | main.i: main.cpp.i 155 | 156 | .PHONY : main.i 157 | 158 | # target to preprocess a source file 159 | main.cpp.i: 160 | $(MAKE) $(MAKESILENT) -f CMakeFiles/cxx.dir/build.make CMakeFiles/cxx.dir/main.cpp.i 161 | .PHONY : main.cpp.i 162 | 163 | main.s: main.cpp.s 164 | 165 | .PHONY : main.s 166 | 167 | # target to generate assembly for a file 168 | main.cpp.s: 169 | $(MAKE) $(MAKESILENT) -f CMakeFiles/cxx.dir/build.make CMakeFiles/cxx.dir/main.cpp.s 170 | .PHONY : main.cpp.s 171 | 172 | # Help Target 173 | help: 174 | @echo "The following are some of the valid targets for this Makefile:" 175 | @echo "... all (the default if no target is provided)" 176 | @echo "... clean" 177 | @echo "... depend" 178 | @echo "... edit_cache" 179 | @echo "... rebuild_cache" 180 | @echo "... cxx" 181 | @echo "... main.o" 182 | @echo "... main.i" 183 | @echo "... main.s" 184 | .PHONY : help 185 | 186 | 187 | 188 | #============================================================================= 189 | # Special targets to cleanup operation of make. 190 | 191 | # Special rule to run CMake to check the build system integrity. 192 | # No rule that depends on this can have commands that come from listfiles 193 | # because they might be regenerated. 194 | cmake_check_build_system: 195 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 196 | .PHONY : cmake_check_build_system 197 | 198 | -------------------------------------------------------------------------------- /comparo/code/cxx/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /Users/janke/local/repos/matlab-bench/comparo/code/cxx 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Is this installation the result of a crosscompile? 31 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 32 | set(CMAKE_CROSSCOMPILING "FALSE") 33 | endif() 34 | 35 | # Set default install directory permissions. 36 | if(NOT DEFINED CMAKE_OBJDUMP) 37 | set(CMAKE_OBJDUMP "/Applications/Xcode-11.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump") 38 | endif() 39 | 40 | if(CMAKE_INSTALL_COMPONENT) 41 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 42 | else() 43 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 44 | endif() 45 | 46 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 47 | "${CMAKE_INSTALL_MANIFEST_FILES}") 48 | file(WRITE "/Users/janke/local/repos/matlab-bench/comparo/code/cxx/${CMAKE_INSTALL_MANIFEST}" 49 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 50 | -------------------------------------------------------------------------------- /comparo/code/cxx/cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/cxx/cxx -------------------------------------------------------------------------------- /comparo/code/cxx/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | 7 | #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) 8 | const char *os_name_char = "Windows"; 9 | #elif __APPLE__ 10 | const char *os_name_char = "Mac"; 11 | #elif __linux__ 12 | const char *os_name_char = "Linux"; 13 | #endif 14 | 15 | std::chrono::time_point tic() { 16 | return std::chrono::high_resolution_clock::now(); 17 | } 18 | 19 | double toc(std::chrono::time_point t0) { 20 | auto t1 = std::chrono::high_resolution_clock::now(); 21 | auto te = t1 - t0; 22 | auto nanos = chrono::duration_cast(te); 23 | return nanos.count(); 24 | } 25 | 26 | class SomeClass { 27 | public: 28 | int x = 42; 29 | void foo() { 30 | x += 1; 31 | } 32 | }; 33 | 34 | class SomeSubclass1: public SomeClass { 35 | 36 | }; 37 | 38 | class SomeSubclass2: public SomeSubclass1 { 39 | 40 | }; 41 | 42 | class SomeSubclass3: public SomeSubclass2 { 43 | 44 | }; 45 | 46 | class Results { 47 | public: 48 | double method = 0; 49 | double method_inh3 = 0; 50 | double prop = 0; 51 | double prop_inh3 = 0; 52 | double prop_write = 0; 53 | }; 54 | 55 | class BenchyPoo { 56 | public: 57 | string out_dir = "../results"; 58 | int n_iters = 10000000; 59 | 60 | static string get_cpu_id() { 61 | return getenv("BENCHMAT_CPU_ID"); 62 | } 63 | 64 | void bench_and_write_results() { 65 | bench_and_write_results_impl(); 66 | bench_and_write_results_impl(); 67 | cout << "C++: wrote results" << endl; 68 | } 69 | 70 | void bench_and_write_results_impl() const { 71 | string cpu_id = get_cpu_id(); 72 | string lang = "C++"; 73 | string os_name = os_name_char; 74 | // TODO: Detect compiler version 75 | string lang_ver = "unknown"; 76 | int sbuf_siz = 8192; 77 | char sbuf[sbuf_siz]; 78 | snprintf(sbuf, sbuf_siz, "%s - %s - %s.json", lang.c_str(), lang_ver.c_str(), os_name.c_str()); 79 | string out_base = sbuf; 80 | snprintf(sbuf, sbuf_siz, "%s/%s/%s", out_dir.c_str(), cpu_id.c_str(), out_base.c_str()); 81 | string out_file = sbuf; 82 | 83 | Results rslts; 84 | bench_method(&rslts); 85 | bench_method_inh3(&rslts); 86 | bench_prop(&rslts); 87 | bench_prop_inh3(&rslts); 88 | bench_prop_write(&rslts); 89 | 90 | snprintf(sbuf, sbuf_siz, "{\"meta\":{\"lang\":\"C++\",\"lang_ver\":\"unknown\"}, \"results\":{\"method\":%f,\"method_inh3\":%f,\"prop\":%f,\"prop_inh3\":%f,\"prop_write\":%f}}\n", 91 | rslts.method, rslts.method_inh3, rslts.prop, rslts.prop_inh3, rslts.prop_write); 92 | string json = sbuf; 93 | ofstream fh; 94 | fh.open(out_file); 95 | fh << json; 96 | fh.close(); 97 | }; 98 | 99 | void bench_method(Results *rslts) const { 100 | auto obj = new SomeClass(); 101 | auto t0 = tic(); 102 | for (int i = 0; i < n_iters; i++) { 103 | obj->foo(); 104 | } 105 | auto te = toc(t0); 106 | rslts->method = te / n_iters; 107 | } 108 | 109 | void bench_method_inh3(Results *rslts) const { 110 | auto obj = new SomeSubclass3(); 111 | auto t0 = tic(); 112 | for (int i = 0; i < n_iters; i++) { 113 | obj->foo(); 114 | } 115 | auto te = toc(t0); 116 | rslts->method_inh3 = te / n_iters; 117 | } 118 | 119 | void bench_prop(Results *rslts) const { 120 | auto obj = new SomeClass(); 121 | auto t0 = tic(); 122 | int x; 123 | for (int i = 0; i < n_iters; i++) { 124 | x = obj->x; 125 | } 126 | auto te = toc(t0); 127 | rslts->prop = te / n_iters; 128 | } 129 | 130 | void bench_prop_inh3(Results *rslts) const { 131 | auto obj = new SomeSubclass3(); 132 | auto t0 = tic(); 133 | int x; 134 | for (int i = 0; i < n_iters; i++) { 135 | x = obj->x; 136 | } 137 | auto te = toc(t0); 138 | rslts->prop_inh3 = te / n_iters; 139 | } 140 | 141 | void bench_prop_write(Results *rslts) const { 142 | auto obj = new SomeClass(); 143 | auto t0 = tic(); 144 | for (int i = 0; i < n_iters; i++) { 145 | obj->x = i; 146 | } 147 | auto te = toc(t0); 148 | rslts->prop_write = te / n_iters; 149 | } 150 | 151 | }; 152 | 153 | int main() { 154 | BenchyPoo b; 155 | b.bench_and_write_results(); 156 | } 157 | -------------------------------------------------------------------------------- /comparo/code/java/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | -------------------------------------------------------------------------------- /comparo/code/java/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 20 | 21 | 22 | 24 | 25 | -------------------------------------------------------------------------------- /comparo/code/java/.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /comparo/code/java/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /comparo/code/java/.idea/google-java-format.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /comparo/code/java/.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | -------------------------------------------------------------------------------- /comparo/code/java/.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /comparo/code/java/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /comparo/code/java/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /comparo/code/java/java.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /comparo/code/java/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | net.apjanke.matlab-bench 8 | java 9 | 0.1-SNAPSHOT 10 | 11 | 12 | 1.8 13 | 1.8 14 | 15 | 16 | 17 | 18 | com.google.code.gson 19 | gson 20 | 2.8.6 21 | 22 | 23 | 24 | com.google.guava 25 | guava 26 | 30.0-jre 27 | 28 | 29 | 30 | 31 | 32 | 33 | maven-dependency-plugin 34 | 35 | 36 | package 37 | 38 | copy-dependencies 39 | 40 | 41 | ${project.build.directory}/lib 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /comparo/code/java/src/main/java/buh/BenchyPoo.java: -------------------------------------------------------------------------------- 1 | package buh; 2 | 3 | import java.io.File; 4 | 5 | import com.google.gson.Gson; 6 | import com.google.common.io.Files; 7 | import com.google.common.base.Charsets; 8 | import com.google.gson.JsonIOException; 9 | 10 | /** 11 | * Any sort of exception we encounter here. 12 | */ 13 | class BenchyException extends RuntimeException { 14 | 15 | // This is just here to satisfy inspections; it should never be used. 16 | static final long serialVersionUID = 420L; 17 | 18 | public BenchyException(String msg) { 19 | super(msg); 20 | } 21 | 22 | } 23 | 24 | public class BenchyPoo { 25 | 26 | static String fs = File.separator; 27 | 28 | int numIters = 100000; 29 | String outDir = ".." + fs + "results"; 30 | 31 | public static void main(String[] args) { 32 | BenchyPoo b = new BenchyPoo(); 33 | b.benchAndWriteResults(); 34 | } 35 | 36 | public BenchyPoo() { 37 | 38 | } 39 | 40 | static double tic() { 41 | return System.nanoTime(); 42 | } 43 | 44 | static double toc(double t0) { 45 | return System.nanoTime() - t0; 46 | } 47 | 48 | public void benchAndWriteResults() { 49 | // Run twice to warm up cache before recording results 50 | benchAndWriteResultsImpl(); 51 | BenchWriteResults rslts = benchAndWriteResultsImpl(); 52 | System.out.format("Java %s: wrote results to %s%n", rslts.langVer, rslts.outFile); 53 | } 54 | 55 | private BenchWriteResults benchAndWriteResultsImpl() { 56 | String cpuId = cpuId(); 57 | String langVer = langVer(); 58 | String platformName = detectPlatformName(); 59 | String outBase = String.format("%s - %s - %s.json", "Java", langVer, platformName); 60 | String cpuDir = outDir + fs + cpuId; 61 | String outFile = cpuDir + fs + outBase; 62 | 63 | BenchResults rslts = new BenchResults(); 64 | benchMethod(rslts); 65 | benchMethodInh3(rslts); 66 | benchProp(rslts); 67 | benchPropInh3(rslts); 68 | benchPropWrite(rslts); 69 | 70 | BenchReport report = new BenchReport(); 71 | report.meta = new BenchReportMeta("Java", langVer); 72 | report.results = rslts; 73 | Gson gson = new Gson(); 74 | String json = gson.toJson(report); 75 | try { 76 | Files.asCharSink(new File(outFile), Charsets.UTF_8).write(json + "\n"); 77 | } catch (Exception e) { 78 | System.err.println("Error: " + e.getMessage()); 79 | } 80 | 81 | return new BenchWriteResults(outFile, langVer); 82 | } 83 | 84 | void benchMethod(BenchResults rslts) { 85 | SomeClass obj = new SomeClass(); 86 | double t0 = tic(); 87 | for (int i = 0; i < numIters; i++) { 88 | obj.foo(); 89 | } 90 | double te = toc(t0); 91 | rslts.method = te / numIters; 92 | } 93 | 94 | void benchMethodInh3(BenchResults rslts) { 95 | SomeSubclass3 obj = new SomeSubclass3(); 96 | double t0 = tic(); 97 | for (int i = 0; i < numIters; i++) { 98 | obj.foo(); 99 | } 100 | double te = toc(t0); 101 | rslts.method_inh_3 = te / numIters; 102 | } 103 | 104 | void benchProp(BenchResults rslts) { 105 | SomeClass obj = new SomeClass(); 106 | double t0 = tic(); 107 | int x; 108 | for (int i = 0; i < numIters; i++) { 109 | x = obj.x; 110 | } 111 | double te = toc(t0); 112 | rslts.prop = te / numIters; 113 | } 114 | 115 | void benchPropInh3(BenchResults rslts) { 116 | SomeSubclass3 obj = new SomeSubclass3(); 117 | double t0 = tic(); 118 | int x; 119 | for (int i = 0; i < numIters; i++) { 120 | x = obj.x; 121 | } 122 | double te = toc(t0); 123 | rslts.prop_inh3 = te / numIters; 124 | } 125 | 126 | void benchPropWrite(BenchResults rslts) { 127 | SomeClass obj = new SomeClass(); 128 | double t0 = tic(); 129 | for (int i = 0; i < numIters; i++) { 130 | obj.x = i; 131 | } 132 | double te = toc(t0); 133 | rslts.prop_write = te / numIters; 134 | } 135 | 136 | static String cpuId() { 137 | String out = System.getenv("BENCHMAT_CPU_ID"); 138 | if (out == null) { 139 | throw new RuntimeException("No BENCHMAT_CPU_ID environment variable defined. Can't continue."); 140 | } 141 | return out; 142 | } 143 | 144 | static String detectPlatformName() { 145 | String osStr = System.getProperty("os.name").toLowerCase(); 146 | if (osStr.contains("win")) { 147 | return "Windows"; 148 | } else if (osStr.contains("mac")) { 149 | return "Mac"; 150 | } else { 151 | // This isn't really correct; could be other Unix, but this program doesn't run on 152 | // any non-Linux Unixes. 153 | return "Linux"; 154 | } 155 | } 156 | 157 | static String langVer() { 158 | return System.getProperty("java.version"); 159 | } 160 | 161 | } 162 | 163 | class BenchReport { 164 | BenchReportMeta meta; 165 | BenchResults results; 166 | } 167 | 168 | class BenchReportMeta { 169 | String lang; 170 | String lang_ver; 171 | BenchReportMeta(String lang, String lang_ver) { 172 | this.lang = lang; 173 | this.lang_ver = lang_ver; 174 | } 175 | } 176 | 177 | class BenchResults { 178 | double method; 179 | double method_inh_3; 180 | double prop; 181 | double prop_inh3; 182 | double prop_write; 183 | } 184 | 185 | class BenchWriteResults { 186 | String outFile; 187 | String langVer; 188 | 189 | public BenchWriteResults(String outFile, String langVer) { 190 | this.outFile = outFile; 191 | this.langVer = langVer; 192 | } 193 | 194 | } 195 | -------------------------------------------------------------------------------- /comparo/code/java/src/main/java/buh/SomeClass.java: -------------------------------------------------------------------------------- 1 | package buh; 2 | 3 | class SomeClass { 4 | 5 | int x = 0; 6 | 7 | void foo() { 8 | // NOP 9 | } 10 | 11 | } 12 | 13 | class SomeSubclass1 extends SomeClass { 14 | 15 | } 16 | 17 | class SomeSubclass2 extends SomeSubclass1 { 18 | 19 | } 20 | 21 | class SomeSubclass3 extends SomeSubclass2 { 22 | 23 | } -------------------------------------------------------------------------------- /comparo/code/java/target/classes/buh/BenchReport.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/classes/buh/BenchReport.class -------------------------------------------------------------------------------- /comparo/code/java/target/classes/buh/BenchReportMeta.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/classes/buh/BenchReportMeta.class -------------------------------------------------------------------------------- /comparo/code/java/target/classes/buh/BenchResults.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/classes/buh/BenchResults.class -------------------------------------------------------------------------------- /comparo/code/java/target/classes/buh/BenchWriteResults.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/classes/buh/BenchWriteResults.class -------------------------------------------------------------------------------- /comparo/code/java/target/classes/buh/BenchyException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/classes/buh/BenchyException.class -------------------------------------------------------------------------------- /comparo/code/java/target/classes/buh/BenchyPoo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/classes/buh/BenchyPoo.class -------------------------------------------------------------------------------- /comparo/code/java/target/classes/buh/SomeClass.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/classes/buh/SomeClass.class -------------------------------------------------------------------------------- /comparo/code/java/target/classes/buh/SomeSubclass1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/classes/buh/SomeSubclass1.class -------------------------------------------------------------------------------- /comparo/code/java/target/classes/buh/SomeSubclass2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/classes/buh/SomeSubclass2.class -------------------------------------------------------------------------------- /comparo/code/java/target/classes/buh/SomeSubclass3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/classes/buh/SomeSubclass3.class -------------------------------------------------------------------------------- /comparo/code/java/target/java-0.1-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/java-0.1-SNAPSHOT.jar -------------------------------------------------------------------------------- /comparo/code/java/target/lib/checker-qual-3.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/lib/checker-qual-3.5.0.jar -------------------------------------------------------------------------------- /comparo/code/java/target/lib/error_prone_annotations-2.3.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/lib/error_prone_annotations-2.3.4.jar -------------------------------------------------------------------------------- /comparo/code/java/target/lib/failureaccess-1.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/lib/failureaccess-1.0.1.jar -------------------------------------------------------------------------------- /comparo/code/java/target/lib/gson-2.8.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/lib/gson-2.8.6.jar -------------------------------------------------------------------------------- /comparo/code/java/target/lib/guava-30.0-jre.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/lib/guava-30.0-jre.jar -------------------------------------------------------------------------------- /comparo/code/java/target/lib/j2objc-annotations-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/lib/j2objc-annotations-1.3.jar -------------------------------------------------------------------------------- /comparo/code/java/target/lib/jsr305-3.0.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/lib/jsr305-3.0.2.jar -------------------------------------------------------------------------------- /comparo/code/java/target/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/lib/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar -------------------------------------------------------------------------------- /comparo/code/java/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Fri Oct 16 18:14:38 EDT 2020 3 | groupId=net.apjanke.matlab-bench 4 | artifactId=java 5 | version=0.1-SNAPSHOT 6 | -------------------------------------------------------------------------------- /comparo/code/java/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | buh/SomeSubclass3.class 2 | buh/BenchWriteResults.class 3 | buh/BenchReport.class 4 | buh/SomeSubclass2.class 5 | buh/BenchReportMeta.class 6 | buh/BenchyPoo.class 7 | buh/BenchyException.class 8 | buh/BenchResults.class 9 | buh/SomeClass.class 10 | buh/SomeSubclass1.class 11 | -------------------------------------------------------------------------------- /comparo/code/java/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | /Users/janke/local/repos/matlab-bench/comparo/code/java/src/main/java/buh/BenchyPoo.java 2 | /Users/janke/local/repos/matlab-bench/comparo/code/java/src/main/java/buh/SomeClass.java 3 | -------------------------------------------------------------------------------- /comparo/code/java/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/janklab/matlab-bench/c2b6aebd6a3810f0193db0dbf8553017784f92a5/comparo/code/java/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst -------------------------------------------------------------------------------- /comparo/code/matlab/BenchyPoo.m: -------------------------------------------------------------------------------- 1 | classdef BenchyPoo 2 | 3 | properties 4 | numIters (1,1) double = 100000 5 | end 6 | 7 | methods 8 | 9 | function benchAndWriteResults(this) 10 | this.benchAndWriteResultsImpl; % once to warm up the caches 11 | [outFile, langVer] = this.benchAndWriteResultsImpl; % and now for real 12 | fprintf('Matlab %s: wrote results to: %s\n', langVer, outFile); 13 | end 14 | 15 | function [outFile, langVer] = benchAndWriteResultsImpl(this) 16 | cpuId = getCpuId; 17 | lang = "Matlab"; 18 | langVer = ['R' version('-release')]; 19 | outBase = sprintf('%s - %s - %s.json', lang, langVer, platformName); 20 | cpuDir = fullfile(findResultsDir, cpuId); 21 | outFile = fullfile(cpuDir, outBase); 22 | rslts = struct; 23 | rslts = this.benchMethod(rslts); 24 | rslts = this.benchMethodInh3(rslts); 25 | rslts = this.benchProp(rslts); 26 | rslts = this.benchPropInh3(rslts); 27 | rslts = this.benchPropWrite(rslts); 28 | % Write results 29 | if ~isfolder(cpuDir) 30 | mkdir(cpuDir); 31 | end 32 | reportData = struct('meta', struct('lang', 'Matlab', 'version', langVer), ... 33 | 'results', rslts); 34 | jsonText = jsonencode(reportData); 35 | spew(outFile, sprintf('%s\n', jsonText)); 36 | end 37 | 38 | function rslts = benchMethod(this, rslts) 39 | obj = SomeClass; 40 | t0 = tic; 41 | for i = 1:this.numIters 42 | obj.foo(); 43 | end 44 | te = toc_nsec(t0); 45 | nsecPerIter = te / this.numIters; 46 | rslts.method = nsecPerIter; 47 | end 48 | 49 | function rslts = benchMethodInh3(this, rslts) 50 | obj = SomeSubclass3; 51 | t0 = tic; 52 | for i = 1:this.numIters 53 | obj.foo(); 54 | end 55 | te = toc_nsec(t0); 56 | nsecPerIter = te / this.numIters; 57 | rslts.method_inh3 = nsecPerIter; 58 | end 59 | 60 | function rslts = benchProp(this, rslts) 61 | obj = SomeClass; 62 | t0 = tic; 63 | for i = 1:this.numIters 64 | z = obj.x; %#ok 65 | end 66 | te = toc_nsec(t0); 67 | nsecPerIter = te / this.numIters; 68 | rslts.prop = nsecPerIter; 69 | end 70 | 71 | function rslts = benchPropInh3(this, rslts) 72 | obj = SomeSubclass3; 73 | t0 = tic; 74 | for i = 1:this.numIters 75 | z = obj.x; %#ok 76 | end 77 | te = toc_nsec(t0); 78 | nsecPerIter = te / this.numIters; 79 | rslts.prop_inh3 = nsecPerIter; 80 | end 81 | 82 | function rslts = benchPropWrite(this, rslts) 83 | obj = SomeClass; 84 | t0 = tic; 85 | for i = 1:this.numIters 86 | obj.x = i; 87 | end 88 | te = toc_nsec(t0); 89 | nsecPerIter = te / this.numIters; 90 | rslts.prop_write = nsecPerIter; 91 | end 92 | 93 | end 94 | 95 | end 96 | 97 | function out = toc_nsec(t0) 98 | te = toc(t0); 99 | out = te * 10^9; 100 | end 101 | 102 | function spew(file, text) 103 | [fid,msg] = fopen(file, 'w'); 104 | if fid < 0 105 | error('Failed opening file %s: %s', file, msg); 106 | end 107 | fprintf(fid, '%s', text); 108 | fclose(fid); 109 | end 110 | 111 | function out = platformName 112 | if ispc 113 | out = "Windows"; 114 | elseif ismac 115 | out = "Mac"; 116 | else 117 | out = "Linux"; 118 | end 119 | end 120 | 121 | function out = getCpuId 122 | out = getenv('BENCHMAT_CPU_ID'); 123 | if isempty(out) 124 | error('No BENCHMAT_CPU_ID environment variable defined. Can''t continue.'); 125 | end 126 | end 127 | 128 | function out = findResultsDir 129 | myDir = fileparts(mfilename('fullpath')); 130 | comparoDir = fileparts(fileparts(myDir)); 131 | out = fullfile(comparoDir, 'results'); 132 | end -------------------------------------------------------------------------------- /comparo/code/matlab/SomeClass.m: -------------------------------------------------------------------------------- 1 | classdef SomeClass 2 | 3 | properties 4 | x = 42 5 | end 6 | 7 | methods 8 | 9 | function foo(this) %#ok 10 | end 11 | 12 | end 13 | 14 | end -------------------------------------------------------------------------------- /comparo/code/matlab/SomeSubclass1.m: -------------------------------------------------------------------------------- 1 | classdef SomeSubclass1 < SomeClass 2 | 3 | end -------------------------------------------------------------------------------- /comparo/code/matlab/SomeSubclass2.m: -------------------------------------------------------------------------------- 1 | classdef SomeSubclass2 < SomeSubclass1 2 | 3 | end -------------------------------------------------------------------------------- /comparo/code/matlab/SomeSubclass3.m: -------------------------------------------------------------------------------- 1 | classdef SomeSubclass3 < SomeSubclass2 2 | 3 | end 4 | -------------------------------------------------------------------------------- /comparo/code/matlab/run_benchmark.m: -------------------------------------------------------------------------------- 1 | function run_benchmark 2 | % Run the benchmarks and write results 3 | 4 | b = BenchyPoo; 5 | b.benchAndWriteResults; 6 | 7 | end 8 | 9 | -------------------------------------------------------------------------------- /comparo/code/python/benchitty.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | import json 3 | import os 4 | import pathlib 5 | import platform 6 | import sys 7 | import time 8 | 9 | 10 | def tic(): 11 | """Current time in float nanoseconds""" 12 | return time.time_ns() 13 | 14 | def toc(t0): 15 | """Elapsed time in float nanoseconds""" 16 | t1 = tic() 17 | return t1 - t0 18 | 19 | def _platform_name(): 20 | """Name of system to be used in results database.""" 21 | sys_name = platform.system() 22 | if sys_name == "Darwin": 23 | out = "Mac" 24 | elif sys_name == "Windows": 25 | out = "Windows" 26 | elif sys_name == "Linux": 27 | out = "Linux" 28 | else: 29 | raise Exception(f"WTF platform is '{sys_name}'???") 30 | return out 31 | 32 | 33 | class BenchyPoo: 34 | def __init__(self): 35 | self.out_dir = "../results" 36 | self.n_iters = 100000 37 | 38 | def cpu_id(self): 39 | if not 'BENCHMAT_CPU_ID' in os.environ: 40 | raise("No BENCHMAT_CPU_ID environment variable defined. Can't continue.") 41 | return os.environ['BENCHMAT_CPU_ID'] 42 | 43 | def lang_ver(self): 44 | vi = sys.version_info 45 | return '%s.%s.%s' % (vi.major, vi.minor, vi.micro) 46 | 47 | def bench_and_write_results(self): 48 | # Run it twice to make sure the caches are warmed up 49 | self._bench_and_write_results_impl() 50 | out_file, lang_ver = self._bench_and_write_results_impl() 51 | print(f'Python {lang_ver}: wrote results to: {out_file}') 52 | 53 | def _bench_and_write_results_impl(self): 54 | cpu_id = self.cpu_id() 55 | lang = "Python" 56 | lang_ver = self.lang_ver() 57 | out_base = '%s - %s - %s.json' % (lang, lang_ver, _platform_name()) 58 | cpu_dir = os.path.join(self.out_dir, cpu_id) 59 | out_file = os.path.join(cpu_dir, out_base) 60 | rslts = {} 61 | self.bench_method(rslts) 62 | self.bench_method_inh3(rslts) 63 | self.bench_prop(rslts) 64 | self.bench_prop_inh3(rslts) 65 | self.bench_prop_write(rslts) 66 | report = { 67 | 'meta': {'lang': 'Python', 'version': lang_ver}, 68 | 'results': rslts 69 | } 70 | pathlib.Path(cpu_dir).mkdir(parents=True, exist_ok=True) 71 | with open(out_file, 'w') as f: 72 | json.dump(report, f) 73 | return (out_file, lang_ver) 74 | 75 | def bench_method(self, rslts): 76 | o = SomeClass() 77 | t0 = tic() 78 | for i in range(self.n_iters): 79 | o.foo() 80 | te = toc(t0) 81 | nsec_per_iter = te / self.n_iters 82 | rslts['method'] = nsec_per_iter 83 | 84 | def bench_method_inh3(self, rslts): 85 | o = SomeSubclass3() 86 | t0 = tic() 87 | for i in range(self.n_iters): 88 | o.foo() 89 | te = toc(t0) 90 | nsec_per_iter = te / self.n_iters 91 | rslts['method_inh3'] = nsec_per_iter 92 | 93 | def bench_prop(self, rslts): 94 | o = SomeClass() 95 | t0 = tic() 96 | for i in range(self.n_iters): 97 | dummy = o.x 98 | te = toc(t0) 99 | nsec_per_iter = te / self.n_iters 100 | rslts['prop'] = nsec_per_iter 101 | 102 | def bench_prop_inh3(self, rslts): 103 | o = SomeSubclass3() 104 | t0 = tic() 105 | for i in range(self.n_iters): 106 | dummy = o.x 107 | te = toc(t0) 108 | nsec_per_iter = te / self.n_iters 109 | rslts['prop_inh3'] = nsec_per_iter 110 | 111 | def bench_prop_write(self, rslts): 112 | o = SomeClass() 113 | t0 = tic() 114 | for i in range(self.n_iters): 115 | o.x = i 116 | te = toc(t0) 117 | nsec_per_iter = te / self.n_iters 118 | rslts['prop_write'] = nsec_per_iter 119 | 120 | class SomeClass: 121 | def __init__(self): 122 | self.x = 42 123 | 124 | def foo(self): 125 | pass 126 | 127 | 128 | class SomeSubclass1(SomeClass): 129 | pass 130 | 131 | 132 | class SomeSubclass2(SomeSubclass1): 133 | pass 134 | 135 | 136 | class SomeSubclass3(SomeSubclass2): 137 | pass -------------------------------------------------------------------------------- /comparo/code/python/run_benchmark.py: -------------------------------------------------------------------------------- 1 | import benchitty 2 | 3 | b = benchitty.BenchyPoo() 4 | b.bench_and_write_results() 5 | -------------------------------------------------------------------------------- /comparo/code/run_benches_mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Set up CPU info 4 | 5 | cpu_str=$(sysctl -n machdep.cpu.brand_string) 6 | mfgr=$(echo "$cpu_str" | cut -d ' ' -f 1) 7 | if [[ "$mfgr" = "Intel(R)" ]]; then 8 | cpu_make="Intel" 9 | cpu_model=$(echo "$cpu_str" | cut -d ' ' -f 3) 10 | elif [[ "$mfgr" = "AMD" ]]; then 11 | cpu_make="AMD" 12 | else 13 | echo "Unrecognized CPU manufacturer: '$mfgr'" >&2 14 | exit 1 15 | fi 16 | 17 | export BENCHMAT_CPU_MAKE="$cpu_make" 18 | export BENCHMAT_CPU_MODEL="$cpu_model" 19 | export BENCHMAT_CPU_ID="$cpu_make $cpu_model" 20 | 21 | # Run benchmarks on everything 22 | 23 | echo "Running Python benchmark..." 24 | PYTHONPATH="./python" python3 python/run_benchmark.py 25 | 26 | echo "Running Matlab benchmarks..." 27 | for mver in 2019b 2020a 2020b; do 28 | app_dir="/Applications/MATLAB_R${mver}.app" 29 | if [[ -e $app_dir ]]; then 30 | echo "Running Matlab R${mver} benchmark..." 31 | matlab_exe="$app_dir/bin/matlab" 32 | bench_cmd="addpath('matlab'); run_benchmark; exit" 33 | $matlab_exe -nodisplay -nosplash -batch "$bench_cmd" 34 | fi 35 | done 36 | 37 | echo "Running Java benchmark..." 38 | CP="java/target/classes" 39 | for jar in java/target/lib/*.jar; do 40 | CP="$CP:$jar" 41 | done 42 | java -cp "$CP" buh.BenchyPoo 43 | 44 | echo "Running C++ benchmark..." 45 | cxx/cxx 46 | 47 | echo "All benchmarks done." 48 | -------------------------------------------------------------------------------- /comparo/results/.dummy: -------------------------------------------------------------------------------- 1 | This file is just here to keep the dir from disappearing from git. 2 | -------------------------------------------------------------------------------- /comparo/results/Intel W-2150B/C++ - unknown - Mac.json: -------------------------------------------------------------------------------- 1 | {"meta":{"lang":"C++","lang_ver":"unknown"}, "results":{"method":2.210287,"method_inh3":1.948319,"prop":1.295103,"prop_inh3":1.279156,"prop_write":2.200795}} 2 | -------------------------------------------------------------------------------- /comparo/results/Intel W-2150B/Java - 15 - Mac.json: -------------------------------------------------------------------------------- 1 | {"meta":{"lang":"Java","lang_ver":"15"},"results":{"method":7.89687,"method_inh_3":6.22017,"prop":3.51481,"prop_inh3":3.51045,"prop_write":3.55473}} 2 | -------------------------------------------------------------------------------- /comparo/results/Intel W-2150B/Matlab - R2019b - Mac.json: -------------------------------------------------------------------------------- 1 | {"meta":{"lang":"Matlab","version":"R2019b"},"results":{"method":112.81356,"method_inh3":114.06621,"prop":23.87087,"prop_inh3":23.35622,"prop_write":53.56353}} 2 | -------------------------------------------------------------------------------- /comparo/results/Intel W-2150B/Matlab - R2020a - Mac.json: -------------------------------------------------------------------------------- 1 | {"meta":{"lang":"Matlab","version":"R2020a"},"results":{"method":23.8512,"method_inh3":27.66893,"prop":26.79407,"prop_inh3":25.02924,"prop_write":56.2766}} 2 | -------------------------------------------------------------------------------- /comparo/results/Intel W-2150B/Matlab - R2020b - Mac.json: -------------------------------------------------------------------------------- 1 | {"meta":{"lang":"Matlab","version":"R2020b"},"results":{"method":28.03408,"method_inh3":25.46709,"prop":24.00286,"prop_inh3":24.08885,"prop_write":55.81688}} 2 | -------------------------------------------------------------------------------- /comparo/results/Intel W-2150B/Python - 3.8.6 - Mac.json: -------------------------------------------------------------------------------- 1 | {"meta": {"lang": "Python", "version": "3.8.6"}, "results": {"method": 106.2, "method_inh3": 105.51, "prop": 45.91, "prop_inh3": 47.73, "prop_write": 60.64}} -------------------------------------------------------------------------------- /results/Intel W-2150B/Python - 3.8.6 - Mac.json: -------------------------------------------------------------------------------- 1 | {"method": 0.0967, "method_inh_3": 0.0897, "prop": 0.0418, "prop_inh3": 0.0413} -------------------------------------------------------------------------------- /results/Intel W-2150B/Python - > - Mac.json: -------------------------------------------------------------------------------- 1 | {"method": 0.0952, "method_inh_3": 0.0982, "prop": 0.0459, "prop_inh3": 0.0463} --------------------------------------------------------------------------------