{"ScriptPreparationCode":null,"TestCases":[{"Name":"hashlookup","Code":"const md5 = \u002711111111111111111111111111111111\u0027;\r\nconst sha1 = \u00271111111111111111111111111111111111111111\u0027;\r\nconst sha256 = \u00271111111111111111111111111111111111111111111111111111111111111111\u0027;\r\nconst invalid = \u002721345\u0027;\r\nconst size = 10000;\r\n\r\nconst hashLookup = ( () =\u003E {\r\n const hashes = {\r\n 32: \u0027md5\u0027,\r\n 64: \u0027sha256\u0027,\r\n 40: \u0027sha1\u0027\r\n };\r\n return function( hash ) { return hashes[ hash.length ]; };\r\n} )();\r\n\r\nfor ( let i = 0; i \u003C size; i\u002B\u002B ) {\r\n hashLookup(md5);\r\n hashLookup(sha1);\r\n hashLookup(sha256);\r\n hashLookup(invalid);\r\n}","IsDeferred":false},{"Name":"hashswitch","Code":"const md5 = \u002711111111111111111111111111111111\u0027;\r\nconst sha1 = \u00271111111111111111111111111111111111111111\u0027;\r\nconst sha256 = \u00271111111111111111111111111111111111111111111111111111111111111111\u0027;\r\nconst invalid = \u002721345\u0027;\r\nconst size = 10000;\r\n\r\nconst hashLookup = ( () =\u003E {\r\n var md5 = \u0027md5\u0027\r\n var sha256 = \u0027sha256\u0027\r\n var sha1 = \u0027sha1\u0027\r\n const hashes = {\r\n 32: md5,\r\n 64: sha256,\r\n 40: sha1\r\n };\r\n return function( hash ) { return hashes[ hash.length ]; };\r\n} )();\r\n\r\nfor ( let i = 0; i \u003C size; i\u002B\u002B ) {\r\n hashLookup(md5);\r\n hashLookup(sha1);\r\n hashLookup(sha256);\r\n hashLookup(invalid);\r\n}","IsDeferred":false}]}