#Octave, 46 43 36 30 23 bytes
Octave, 46 43 36 30 23 bytes
tic;(-1e3:1e3)',toc*1e3
This will print:
ans =
-1000
-999
-998
-997
-996
-995
If you don't like the ans =
, then we have to add an additional 6 bytes for disp
:
tic;disp((-1e3:1e3)'),toc*1e3
Saved a lot of bytes thanks to a few reminders from rahnema1.
Explanation:
tic; % Starts timer
(-1e3:1e3)' % A vertical vector -1000 ... 1000
disp((-1e3:1e3)'), % Display this vector
toc*1e3 % Stop the timer and output the time in milliseconds