I was wondering what the advantage is of using data assignment to the DOM vs. NOT to the DOM 

i.e. Assume we have said HTML

```
<a id="foo" href="#">foo!</a>

//Set attr data-me so it's <a id="foo" data-me="yay" href="#">foo!</a>
$('#foo').attr('data-me', 'yay');

//Retrieve the data 'yay'
$('#foo').data('data-me');

```

Over and above direct assignment:

```
var myInput = $('#foo');    

//Add some data
$.data(myInput, 'data-me', 'yay');

//Retrieve the data 'yay'
$.data(myInput, 'data-me');

```

My understanding is that the later is `MUCH` faster and therefore I can't see the sense in adding `data-someAttr` all over the DOM when it's not required ?