robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
f907614088
master
1local t =require ( 'test.testutil' ) 2 3local describe , it =t . describe , t . it 4describe ( 'vim.text' , function () 5local input , output =string . rep ( '😂' , 2 ^ 16 ), string . rep ( 'F09F9882' , 2 ^ 16 ) 6 7it ( 'hexencode' , function () 8t . bench ( function () 9vim . text . hexencode ( input ) 10end , { n =100 , label ='hexencode' } ) 11end ) 12 13it ( 'hexdecode' , function () 14t . bench ( function () 15vim . text . hexdecode ( output ) 16end , { n =100 , label ='hexdecode' } ) 17end ) 18end )