Created
July 10, 2012 13:44
-
-
Save makevoid/3083329 to your computer and use it in GitHub Desktop.
100 thousand matches in 0.3 sec on my machine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # encoding: utf-8 | |
| text = <<-LOL | |
| <!DOCTYPE html> | |
| <html class='no-js' lang='en'> | |
| <head> | |
| <meta charset='utf-8'> | |
| <title>5apps</title> | |
| <meta content='Deployment and distribution tools for HTML5 app developers' name='description'> | |
| <meta content='width=device-width, minimum-scale=1.0, maximum-scale=1.0' name='viewport'> | |
| <meta content='yes' name='apple-mobile-web-app-capable'> | |
| <meta content='black' name='apple-mobile-web-app-status-bar-style'> | |
| <meta content='' name='description'> | |
| <!-- www.phpied.com/conditional-comments-block-downloads/ --> | |
| <!--[if IE]> <![endif]--> | |
| <!-- --> | |
| <!--[if IE]> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <![endif]--> | |
| <link href='/favicon.ico' rel='shortcut icon' type='image/x-icon'> | |
| <script src="/assets/jquery.js?body=1" type="text/javascript"></script> | |
| <script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script> | |
| <script src="/assets/plugins.js?body=1" type="text/javascript"></script> | |
| <script src="/assets/modernizr-1.5.min.js?body=1" type="text/javascript"></script> | |
| <script src="/assets/utils.js?body=1" type="text/javascript"></script> | |
| <script src="/assets/forms.js?body=1" type="text/javascript"></script> | |
| <script src="/assets/flash_messages.js?body=1" type="text/javascript"></script> | |
| <script src="/assets/browser_id.js?body=1" type="text/javascript"></script> | |
| <script src="/assets/jquery.tipsy.js?body=1" type="text/javascript"></script> | |
| <script src="/assets/jquery-ui-1.8.16.custom.min.js?body=1" type="text/javascript"></script> | |
| <script src="/assets/application.js?body=1" type="text/javascript"></script> | |
| <link href="/assets/application.css?body=1" media="screen" rel="stylesheet" type="text/css" /> | |
| <meta content="authenticity_token" name="csrf-param" /> | |
| <meta content="UVRIKwg5mgrBCHP5yygTpke2Nw366dufEzyt7uiGQGk=" name="csrf-token" /> | |
| <script type="text/javascript" src="https://use.typekit.com/jqd0khk.js"></script> | |
| <script type="text/javascript">try{Typekit.load();}catch(e){}</script> | |
| </head> | |
| <body class='teaser'> | |
| <div id='topbar'> | |
| <div id='topbar-inner'> | |
| <h1> | |
| <a href="http://5apps.dev/"><span class="five">5</span>apps</a> | |
| </h1> | |
| <nav class='sites'> | |
| <ul> | |
| <li class='current'><a href="/develop">Develop</a></li> | |
| <li><a href="/news">News</a></li> | |
| <li><a href="http://help.5apps.com">Help & Support</a></li> | |
| </ul> | |
| </nav> | |
| <section id='account'> | |
| <ul> | |
| <li class='login'> | |
| <a href="/users/sign_in">Log in</a> | |
| </li> | |
| <li class='signup'> | |
| <a href="/users/sign_up">Sign up</a> | |
| </li> | |
| <li class='github_login'> | |
| <a href="/users/auth/github">Sign in with GitHub</a> | |
| </li> | |
| <li class='browserid_login'> | |
| <a href="/users/auth/browser_id">Sign in with BrowserID</a> | |
| <form action='/users/auth/browser_id/callback' id='browser_id_form'> | |
| <input name='assertion' type='hidden'> | |
| </form> | |
| </li> | |
| </ul> | |
| </section> | |
| </div> | |
| </div> | |
| <div id='container'> | |
| <section id='main'> | |
| <div id='flash'> | |
| <div class="notice"><p>So long, and thanks for all the fish!</p><a href="#" class="close">x</a></div> | |
| </div> | |
| <header> | |
| <h2> | |
| One codebase to rule them all. | |
| </h2> | |
| <p> | |
| 5apps automatically packages and deploys your HTML5 app for | |
| painless distribution to all major platforms and web app stores. | |
| </p> | |
| </header> | |
| <div class='steps'> | |
| <div class='step'> | |
| <div class='image'> | |
| <img alt="Step_01" src="/assets/teaser/step_01.png" /> | |
| </div> | |
| <p> | |
| Develop your app with web platform technologies like JavaScript, HTML5, and | |
| CSS. Use any framework you want. | |
| </p> | |
| </div> | |
| <div class='step'> | |
| <div class='image'> | |
| <img alt="Step_02" src="/assets/teaser/step_02.png" /> | |
| </div> | |
| <p> | |
| Push your code via Git, and we package and deploy your app in all available | |
| formats, and prepare it for submission to stores. | |
| </p> | |
| </div> | |
| <div class='step'> | |
| <div class='image'> | |
| <img alt="Step_03" src="/assets/teaser/step_03.png" /> | |
| </div> | |
| <p> | |
| After your app is deployed, people can use, install, or update it in either their | |
| browsers or operating systems. | |
| </p> | |
| </div> | |
| </div> | |
| <div class='call_to_action'> | |
| <h3> | |
| Get early beta access: | |
| </h3> | |
| <p class='signup'> | |
| <a href="/users/sign_up?beta=true">Sign Up</a> | |
| </p> | |
| <p class='signin'> | |
| Or sign in with | |
| <span>your</span> | |
| <a href="/users/auth/github?beta=true" id="github_beta_login"><img alt="GitHub" src="/assets/teaser/signin_github.png" /></a> | |
| <span>account</span> | |
| or | |
| <a href="/users/auth/browser_id?beta=true" class="browserid_login"><img alt="BrowserID" src="/assets/teaser/signin_browserid.png" /></a> | |
| </p> | |
| </div> | |
| </section> | |
| <footer> | |
| <p class='info'> | |
| <a href="http://5apps.dev/multipass?to=http%3A%2F%2Fhelp.5apps.com">Help</a> | |
| <span class='divider'>·</span> | |
| <a href="/about">About</a> | |
| <span class='divider'>·</span> | |
| <a href="http://blog.5apps.com">Blog</a> | |
| <span class='divider'>·</span> | |
| <a href="mailto:mail@5apps.com">Contact</a> | |
| <span class='divider'>·</span> | |
| <a href="https://twitter.com/5apps_">Twitter</a> | |
| </p> | |
| <p class='legal'> | |
| © 2012 Appcache Ltd. All rights reserved. | |
| <span class='divider'>·</span> | |
| <a href="/privacy">Privacy Policy</a> | |
| <span class='divider'>·</span> | |
| <a href="/terms">Terms of Service</a> | |
| </p> | |
| </footer> | |
| </div> | |
| <script src='https://browserid.org/include.js' type='text/javascript'></script> | |
| </body> | |
| </html> | |
| LOL | |
| require "benchmark" | |
| Benchmark.bm do |x| | |
| x.report do | |
| 100_000.times do | |
| text =~ /5apps|Twitter|Privacy Policy|Terms of Service|lololololladinlololololol/ | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment