Advertisement
snake5

sgscript sorting test 2

Oct 25th, 2013
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a = [].reserve(80000);
  2. t0 = ftime();
  3. for(i=0;i<80000;++i)
  4.     a.push( fmt_base64_encode( rand() ) );
  5. t1 = ftime();
  6. a.sort();
  7. t2 = ftime();
  8.  
  9. printlns(
  10.     "fill: " $ t1 - t0,
  11.     "sort: " $ t2 - t1
  12. );
  13. println( "1234th item: " $ a[1234] );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement