HTML Preparation code:
x
 
1
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js'></script>
2
<div id="body">
3
<div class="navbar navbar-inverse navbar-fixed-top">
4
        <div class="container">
5
            <div class="navbar-header">
6
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
7
                    <span class="sr-only">Toggle navigation</span>
8
                    <span class="icon-bar"></span>
9
                    <span class="icon-bar"></span>
10
                    <span class="icon-bar"></span>
11
                </button>
12
                <a class="navbar-brand" href="/"><i class="fa fa-bar-chart" aria-hidden="true"></i>&nbsp;MeasureThat.net<sup>beta</sup></a>
13
            </div>
14
            <div class="navbar-collapse collapse">
15
                <ul class="nav navbar-nav">
16
                    <li><a href="/Benchmarks/Add">Create</a></li>
17
                    <li><a href="/blog/index.html">Blog<sup>new</sup></a></li>
18
                    <li><a data-toggle="modal" data-target="#aboutModal" href="#">About</a></li>
19
                    <li><a href="/Home/Discussions">Suggestions & Feedback</a></li>
20
21
                    <li><a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&no_note=0&lc=US&currency_code=USD&bn=PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest&business=MeasureThat@outlook.com&item_name=MeasureThat&item_number=Support%20service&amount=0"><img src="https://www.paypalobjects.com/en_GB/i/btn/btn_donate_LG.gif" border="0" alt="PayPal &#8212; The safer, easier way to pay online." /></a></li>
22
                </ul>
23
                
24
25
    <ul class="nav navbar-nav navbar-right">
26
        <li><a href="/Account/Register">Register</a></li>
27
        <li><a href="#" data-toggle="modal" data-target="#authenticateModal">Log in</a></li>
28
    </ul>    
29
30
            </div>
31
        </div>
32
    </div>
33
    <div class="container body-content">
34
        <div class="row">
35
            
36
37
<div class="jumbotron">
38
    <h1>MeasureThat.net&nbsp;<i class="fa fa-bar-chart" aria-hidden="true"></i></h1>
39
    <p class="lead">MeasureThat.net is the website to create and run JavaScript benchmarks. It uses <a target="_blank" href="https://benchmarkjs.com/">BenchmarkJS (v.2.1.1)</a> as a test runner.</p>
40
    <p>Click <strong>Create Benchmark</strong> to get started</p>
41
    <p>
42
43
    <a class="btn btn-primary btn-lg" href="/Benchmarks/Add"><i class="fa fa-plus" aria-hidden="true"></i>&nbsp;Create benchmark</a>
44
45
        <a class="btn btn-default btn-lg" href="/Benchmarks">Latest benchmarks</a>
46
        <a class="btn btn-default btn-lg" href="/Benchmarks/My">Your benchmarks</a>
47
    </p>
48
</div>
49
50
<div class="col-md-4">
51
    <h2>Help to improve this website</h2>
52
    <p>Please report any issues or make suggestions on the projec'ts GitHub page. Also feel free to join development effort, source code available on GitHub.</p>
53
    <p><a target="_blank" class="btn btn-default" href="https://github.com/thecoderok/MeasureThat.net">GitHub/MeasureThat.net &raquo;</a></p>
54
</div>
55
<div class="col-md-4">
56
    <h2>Open Source & Cross platform</h2>
57
    <p>This website was built using Microsoft .Net Core and can be ran & developed on Windows/Linux/Mac. (instructions about how to get started in building and running it locally will be posted later)</p>
58
    <p><a target="_blank" href="http://the-coderok.azurewebsites.net/2016/10/11/Run-MeasureThat-net-application-on-Linux-building-and-running-the-application/">How to run the application on Linux using PostgreSQL as a database</a></p>
59
</div>
60
61
<div class="col-md-4">
62
    <h2>Sample benchmarks:</h2>
63
    <ul>
64
        <li>
65
            <a href="https://www.measurethat.net/Benchmarks/Show/373/0/empty-an-array-in-javascript">Clear the array</a>
66
        </li>
67
        <li>
68
            <a href="https://www.measurethat.net/Benchmarks/Show/1/demo-benchmark">Demo benchmark (example from benchmarkjs.com)</a>
69
        </li>
70
        <li>
71
            <a href="https://www.measurethat.net/Benchmarks/Show/2/caching-length-property-vs-getting-it-each-ti">Caching length property vs getting it each time in the loop</a>
72
        </li>
73
        <li>
74
            <a href="https://www.measurethat.net/Benchmarks/Show/3/jquery-by-id-vs-documentgetelementbyid">jQuery by id vs Document.getElementById</a>
75
        </li>
76
        <li>
77
            <a href="https://www.measurethat.net/Benchmarks/Show/4/ecmascript6-int16array-vs-regular-js-array">EcmaScript6 Int16Array vs regular JS array</a>
78
        </li>
79
        <li>
80
            <a href="https://www.measurethat.net/Benchmarks/Show/19/0/which-equals-operator-vs-is-faster">Which equals operator (== vs ===) is faster?</a>
81
        </li>
82
    </ul>
83
</div>
84
<hr />
85
<br>
86
<div class="col-md-6">
87
    <br>
88
89
    <p style="display:none;" id="github_buttons">
90
        <a class="github-button" href="https://github.com/thecoderok" data-count-href="/thecoderok/followers" data-count-api="/users/thecoderok#followers" data-count-aria-label="# followers on GitHub" aria-label="Follow @thecoderok on GitHub">Follow @thecoderok</a>
91
        <a class="github-button" href="https://github.com/thecoderok/MeasureThat.net/fork" data-icon="octicon-repo-forked" data-count-href="/thecoderok/MeasureThat.net/network" data-count-api="/repos/thecoderok/MeasureThat.net#forks_count" data-count-aria-label="# forks on GitHub" aria-label="Fork thecoderok/MeasureThat.net on GitHub">Fork</a>
92
        <a class="github-button" href="https://github.com/thecoderok/MeasureThat.net" data-icon="octicon-star" data-count-href="/thecoderok/MeasureThat.net/stargazers" data-count-api="/repos/thecoderok/MeasureThat.net#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star thecoderok/MeasureThat.net on GitHub">Star</a>
93
        <a class="github-button" href="https://github.com/thecoderok/MeasureThat.net/issues" data-icon="octicon-issue-opened" data-count-api="/repos/thecoderok/MeasureThat.net#open_issues_count" data-count-aria-label="# issues on GitHub" aria-label="Issue thecoderok/MeasureThat.net on GitHub">Issue</a>
94
    </p>
95
    <p>
96
        <div class="fb-like" data-href="https://measurethat.net/" data-layout="standard" data-action="like" data-size="small" data-show-faces="true" data-share="true"></div>
97
    </p>
98
99
    <div class="fb-page" data-href="https://www.facebook.com/MeasureThat.Net/" data-tabs="timeline" data-small-header="true" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/MeasureThat.Net/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/MeasureThat.Net/">MeasureThat.net</a></blockquote></div>
100
</div>
101
<div class="col-md-6">
102
    <h2>Change log:</h2>
103
    <h3>v1.0.48.0 (12/20/2017)</h3>
104
    <ul>
105
        <li>
106
            Release after long pause
107
        </li>
108
        <li>
109
            Improved performance
110
        </li>
111
        <li>
112
            Better pagination
113
        </li>
114
    </ul>
115
    <h3>v1.0.41.0 (9/9/2016)</h3>
116
    <ul>
117
        <li>
118
            Support local accounts (in addition to OpenId providers) (<a href="https://github.com/thecoderok/MeasureThat.net/issues/37" target="_blank">#37</a>)
119
        </li>
120
        <li>
121
            Multiple bug fixes.
122
        </li>
123
    </ul>
124
    <h3>v1.0.38.0 (9/7/2016)</h3>
125
    <ul>
126
        <li>
127
            Show info to the user that benchmark will be posted as guest and unable to edit (<a href="https://github.com/thecoderok/MeasureThat.net/issues/45" target="_blank">#45</a>)
128
        </li>
129
        <li>
130
            Edit button for the owner on the Show page (<a href="https://github.com/thecoderok/MeasureThat.net/issues/46" target="_blank">#46</a>)
131
        </li>
132
        <li>
133
            Fix alignment of the latest benchmarks & history sections on the home page bug (<a href="https://github.com/thecoderok/MeasureThat.net/issues/48" target="_blank">#48</a>)
134
        </li>
135
        <li>
136
            Use correct benchmark version when saving result bug (<a href="https://github.com/thecoderok/MeasureThat.net/issues/44" target="_blank">#44</a>)
137
        </li>
138
    </ul>
139
    <h3>v1.0.36.0 (9/2/2016)</h3>
140
    <ul>
141
        <li>
142
            Fixed bug with 404 error which made adding new benchmarks impossible (lesson learned: do not make late night deployment when tired :( ))
143
        </li>
144
    </ul>
145
    <h3>v1.0.34.0 (9/2/2016)</h3>
146
    <ul>
147
        <li>
148
            Ability to edit own benchmarks (user must be authenticated)
149
        </li>
150
    </ul>
151
    <br>
152
    <h3>v1.0.33.0 (9/1/2016)</h3>
153
    <ul>
154
        <li>
155
            Authentication not needed to create benchmarks
156
        </li>
157
        <li>
158
            Fixed bug when test case parsing (Server was unable to read input provided by user when user delted some test case.)
159
        </li>
160
        <li>
161
            "My" benchmarks now ordered by date when they were created.
162
        </li>
163
    </ul>
164
</div>
165
166
167
<div id="fb-root"></div>
168
169
<!--GitHub stuff-->
170
<!--<a target="_blank" href="https://github.com/thecoderok/MeasureThat.net"><img style="position: absolute; top: 0; right: 0; border: 0; z-index: 1500;" src="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></a>-->
171
172
173
174
        </div>
175
        <hr />
176
        <footer>
177
            <p>&copy; 2018 - MeasureThat.net (Version: 1.2.55.0)</p>
178
            <div id="ads">
179
                
180
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
181
    <!-- measurethat.net -->
182
    <ins class="adsbygoogle"
183
         style="display:block"
184
         data-ad-client="ca-pub-2889218219879125"
185
         data-ad-slot="5761409685"
186
         data-ad-format="auto"></ins>
187
            </div>
188
        </footer>
189
190
    </div>
191
    <div class="modal fade" id="aboutModal" tabindex="-1" role="dialog" aria-labelledby="myModal-label" aria-hidden="true">
192
    <div class="modal-dialog">
193
        <div class="modal-content">
194
            <div class="modal-header">
195
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
196
                <h4 class="modal-title" id="myModal-label">About</h4>
197
            </div>
198
            <div class="modal-body">
199
                <h2>JavaScript performance benchmarks</h2>
200
                <p><b>Source code:</b> <a target="_blank" href="https://github.com/thecoderok/MeasureThat.net">GitHub/MeasureThat.net</a></p>
201
                <p><b>Report issues:</b> <a target="_blank" href="https://github.com/thecoderok/MeasureThat.net/issues">MeasureThat.net/Issues</a>
202
                <p><b>Based on:</b> <a target="_blank" href="https://benchmarkjs.com/">Benchmark.js (v2.1.1)</a>
203
                <p>
204
                    <b>Facebook page:</b> <a target="_blank" href="https://www.facebook.com/MeasureThat.Net">https://www.facebook.com/MeasureThat.Net</a>
205
                </p>
206
            </div>
207
            <div class="modal-footer">
208
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
209
            </div>
210
        </div>
211
    </div>
212
</div>
213
214
<div class="modal fade" id="authenticateModal" tabindex="-1" role="dialog" aria-labelledby="authenticateModal-label" aria-hidden="true">
215
    <div class="modal-dialog">
216
        <div class="modal-content">
217
            <div class="modal-header">
218
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
219
                <h4 class="modal-title" id="authenticateModal-label">Log in using external service:</h4>
220
            </div>
221
            <div class="modal-body" style="text-align: center">
222
                
223
<section>
224
            <form method="post" class="form-horizontal" action="/Account/ExternalLogin">
225
                <div>
226
                    <p>
227
                            <button type="submit" class="btn btn-default" name="provider" value="Facebook" title="Log in using your Facebook account">
228
                                <i class="fa fa-facebook fa-4x" aria-hidden="true"></i>
229
                                <br>
230
                                Facebook
231
                            </button>
232
                            <button type="submit" class="btn btn-default" name="provider" value="Twitter" title="Log in using your Twitter account">
233
                                <i class="fa fa-twitter fa-4x" aria-hidden="true"></i>
234
                                <br>
235
                                Twitter
236
                            </button>
237
                            <button type="submit" class="btn btn-default" name="provider" value="Google" title="Log in using your Google account">
238
                                <i class="fa fa-google fa-4x" aria-hidden="true"></i>
239
                                <br>
240
                                Google
241
                            </button>
242
                    </p>
243
                </div>
244
            <input name="__RequestVerificationToken" type="hidden" value="CfDJ8HWN38AjWUBAkR_eDVYrfCVQuHWf5t5jyRG6vSSjq_LoKfWFEYZvjp0oEERebN-Y4m5-RKqnGqiH1GmrjB6sFE4Msu-F6TFavf3zkdy0rZY645-EGbcV_5sjlQ1MhOEJ26OnnMTEZ3QFXnziwjHShvo" /></form>
245
</section>
246
<section>
247
    Or <a class="btn btn-primary" href="/Account/Login">Sign in with local account</a>
248
</section>
249
            </div>
250
            <div class="modal-footer">
251
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
252
            </div>
253
        </div>
254
    </div>
255
</div>
256
</div>
Script Preparation code:
 
var body = $('#body');
Tests:
  • text()

     
    var text = body.text();
  • html()

     
    var html = body.html();
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    text()
    html()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36
Chrome 69 on Windows
View result in a separate tab
Test name Executions per second
text() 38190.3 Ops/sec
html() 7107.2 Ops/sec