@@ -20,6 +20,7 @@ function formatNumber(num, precision) {
2020 . replaceAll ( "," , "_" ) ;
2121}
2222
23+ /* eslint-disable @stylistic/max-len */
2324const samples = {
2425 seanmonstar_httparse : http ( `
2526 GET /wp-content/uploads/2010/03/hello-kitty-darth-vader-pink.jpg HTTP/1.1\\r\\n
@@ -50,6 +51,7 @@ const samples = {
5051 Cache-Control: max-age=0\\r\\n\\r\\nb\\r\\nhello world\\r\\n0\\r\\n\\r\\n
5152 ` )
5253} ;
54+ /* eslint-enable @stylistic/max-len */
5355
5456async function main ( ) {
5557 const mod = await WebAssembly . compile (
@@ -85,7 +87,7 @@ async function main () {
8587 } ,
8688 } ) ;
8789
88- for ( const [ name , payload ] of Object . entries ( samples ) ) {
90+ for ( const [ name , payload ] of Object . entries ( samples ) ) {
8991 const len = payload . length ;
9092 const iterations = 2 ** 33 / len ;
9193 const total = iterations * len ;
@@ -94,9 +96,9 @@ async function main () {
9496 const ptr = llhttp . malloc ( len ) ;
9597 new Uint8Array ( llhttp . memory . buffer , ptr , len ) . set ( Buffer . from ( payload ) ) ;
9698
97- let start = process . hrtime . bigint ( ) ;
99+ const start = process . hrtime . bigint ( ) ;
98100 for ( let i = 0 ; i < iterations ; i ++ ) {
99- const ret = llhttp . llhttp_execute ( parser , ptr , len ) ;
101+ llhttp . llhttp_execute ( parser , ptr , len ) ;
100102 }
101103
102104 llhttp . free ( ptr ) ;
0 commit comments