Skip to content
Snippets Groups Projects
Commit 8da95b02 authored by deuce's avatar deuce
Browse files

CRC calc takes 3.8 seconds of CPU time on Deuce's computer when

len==UINT_MAX/8
parent 2f759541
No related branches found
No related tags found
No related merge requests found
......@@ -527,7 +527,7 @@ js_chksum(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
if((p=js_ValueToStringBytes(cx, argv[0], &len))==NULL)
return(JS_FALSE);
rc=JS_SUSPENDREQUEST(cx); /* Deuce: Is this really necessary? */
rc=JS_SUSPENDREQUEST(cx); /* 3.8 seconds on Deuce's computer when len==UINT_MAX/8 */
while(len--) sum+=*(p++);
JS_RESUMEREQUEST(cx, rc);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment