NUM_CORES = 256

S = inline('1 ./ ( ((1-F)./PERF) + (F ./ (NUM_CORES - r + PERF)))')

n_bcrs = [1:NUM_CORES]
PERF = sqrt(n_bcrs);
% t = 2;

figure
F = 0.999;
speedup = S(F, NUM_CORES, PERF, n_bcrs);
semilogx(n_bcrs, speedup,'-', 'LineWidth',2,'Color',[0.25 0.25 0.25])
text(n_bcrs(1),speedup(1), 'f=0.999','HorizontalAlignment','left')

hold on
xlabel('r BCEs', 'FontSize', 14)
ylabel('Speedup_{asymmetric}', 'FontSize', 14)
title(['Asymmetric, n = ', int2str(NUM_CORES)],'FontSize', 14)

F = 0.99;
speedup = S(F, NUM_CORES, PERF, n_bcrs);
semilogx(n_bcrs, speedup,':', 'LineWidth',2,'Color',[0.25 0.25 0.25])
text(n_bcrs(1),speedup(1), 'f=0.99','HorizontalAlignment','left')

F = 0.975;
speedup = S(F, NUM_CORES, PERF, n_bcrs);
semilogx(n_bcrs, speedup,'-.', 'LineWidth',2,'Color',[0.25 0.25 0.25])
text(n_bcrs(1),speedup(1), 'f=0.975','HorizontalAlignment','left')

F = 0.9;
speedup = S(F, NUM_CORES, PERF, n_bcrs);
semilogx(n_bcrs, speedup,'--', 'LineWidth',2,'Color',[0.25 0.25 0.25])
text(n_bcrs(1),speedup(1), 'f=0.9','HorizontalAlignment','left')

F = 0.5;
speedup = S(F, NUM_CORES, PERF, n_bcrs);
semilogx(n_bcrs, speedup,'-', 'LineWidth',2,'Color',[0.25 0.25 0.25])
text(n_bcrs(1),speedup(1), 'f=0.5','HorizontalAlignment','left')

tmp = [1:log2(NUM_CORES)]
ticks = 2.^tmp
set(gca, 'xtick', ticks)
set(gcf, 'Position', [397, 311, 626, 384])
axis([1, NUM_CORES, -Inf, NUM_CORES])

