Skip to content

Instantly share code, notes, and snippets.

@Gabrock94
Created October 17, 2023 07:14
Show Gist options
  • Save Gabrock94/f42c249ab41562ba33d3e7f37e3b2d30 to your computer and use it in GitHub Desktop.
Save Gabrock94/f42c249ab41562ba33d3e7f37e3b2d30 to your computer and use it in GitHub Desktop.
Test matlab JIT
User
Convert the following snippet to Python
% This script is used to test JIT compilation over huge number of nTrials
%in each iterations we generate a matrix of nNumbers uniformely distributed random
%trials
nTrials = 100;
nNumbers = 1000;
executionTime = zeros(1, nTrials);
for trial =1:nTrials
tic
%rand(nNumbers);
zeros(1, nNumbers)
executionTime(trial) = toc;
end
plot(1:nTrials, executionTime)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment