Last active
August 29, 2015 14:08
-
-
Save chappjc/a038a74945d84015e61b to your computer and use it in GitHub Desktop.
Benchmarking for CST-Link's challenge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% solution_referee_timeit.m | |
clear all | |
N = 100e3; % 60000; | |
%// Input (Keep N as big as possible) | |
list_of_words = repmat({'02_04_04_52_23_14_54_672_0'},N,1); | |
f1 = @() eval_and_loops_solution(list_of_words); | |
time_eval = timeit(f1); | |
clear f1 | |
f2 = @() single_sscanf_solution_2(list_of_words); | |
time_sscanf2 = timeit(f2); | |
clear f2 | |
f3 = @() approach1(list_of_words); | |
time_Divakar = timeit(f3); | |
clear f3 | |
f4 = @() char_and_sscanf_solution(list_of_words); | |
time_Luis = timeit(f4); | |
clear f4 | |
f5 = @() extractIntsSprintfTextScan(list_of_words); | |
time_Jon = timeit(f5); | |
time_eval | |
time_sscanf2 | |
time_Divakar | |
time_Luis | |
time_Jon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment