Cookie Parsing
JavaScript performance comparison
Info
Comparing two RegExp and String parsing methods for getting a value from a cookie.
Then adding in Lawnchair's cookie parser, for fun.
Preparation code
<script>
var set = 'name2',
cookie = 'name1=val1;name2=val2;name3=val3';
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
String |
|
pending… |
RegExp (exec) |
|
pending… |
Lawnchair |
|
pending… |
RegExp (match) |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by BrianMB
- Revision 3: published by BrianMB
- Revision 4: published by BrianMB
- Revision 5: published
- Revision 6: published
- Revision 7: published
- Revision 8: published
- Revision 9: published by taf2
- Revision 10: published
- Revision 11: published
- Revision 13: published
- Revision 14: published
0 comments