jQuery Serialize vs Map

JavaScript performance comparison

Test case created by Nathan

Preparation code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
<form id="test">
  <input type="checkbox" name="test1" value="true" checked="checked">
  <input type="checkbox" name="test2" value="true">
  <input type="checkbox" name="test3" value="true">
<div id="results">

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
jQuery Serialize
var results = $('#test').serialize();
jQuery Map
var results = $('#test').find('input[type="checkbox"]').map(function() {
  return this.name + "=" + this.checked;


You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers


Comment form temporarily disabled.

Add a comment