В принципе как и ожидалось.)
<script type="text/javascript">
function f1(){
var str='youtube.com/watch?v=PstrAfoMKlc&feature=rec-LGOUT-exp_stronger_r2-2r-6-HM'+Math.round();
var beg='/watch?v=';
var end='&';
var i=str.indexOf(beg)+beg.length;
var j=str.indexOf(end,i);
return str.substring(i,j)
}
function f2(){
var str='youtube.com/watch?v=PstrAfoMKlc&feature=rec-LGOUT-exp_stronger_r2-2r-6-HM'+Math.round();
return /\?v=(\w+?)&/.exec(str)[1]
}
function f3(){
var str='youtube.com/watch?v=PstrAfoMKlc&feature=rec-LGOUT-exp_stronger_r2-2r-6-HM'+Math.round();
return str.split('?v=')[1].split('&')[0]
}
function test(f){
var d=new Date(),i=10000,str='';
while(i--){str+=f()};
document.write(new Date()-d+'<br>')
return str
}
var ar=[test(f1),test(f2),test(f3)]
document.write(ar[1]==ar[2]&&ar[0]==ar[1])
</script>