Last active
September 25, 2024 16:43
-
-
Save hawkrives/f631d8823ade76aa0c846be5ce08e9ee to your computer and use it in GitHub Desktop.
Untitled benchmark (http://jsbench.github.io/#f631d8823ade76aa0c846be5ce08e9ee) #jsbench #jsperf
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Untitled benchmark</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="https://wzrd.in/standalone/htmlparser2@3"></script> | |
<script src="https://wzrd.in/standalone/css-select@1"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> | |
<h2><code>cmd + alt + j</code> or <code>ctrl + alt + j</code></h2> | |
</body> | |
</html> |
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
"use strict"; | |
(function (factory) { | |
if (typeof Benchmark !== "undefined") { | |
factory(Benchmark); | |
} else { | |
factory(require("benchmark")); | |
} | |
})(function (Benchmark) { | |
var suite = new Benchmark.Suite; | |
Benchmark.prototype.setup = function () { | |
var data = '<div style="width:335px"><img src="http://wp.stolaf.edu/wp-content/uploads/2016/12/HublerDaytonJack325x425.jpg" width="325" height="425"><p>Jack Hubler-Dayton ’17 with the equipment he used to conduct advanced photogrammetry, a type of 3D modeling, during a training program at Cultural Heritage Imaging.</p></div> <p><span style="font-weight:400"> When you think of archaeological work, you might think of traditional methods like excavation.</span></p> <p>But in their project to preserve a site older than Stonehenge, St. Olaf College faculty and students are taking up the same advanced digital tools that are often used by engineers and businesses.</p> <p><span style="font-weight:400">Through advanced photogrammetry, Jack Hubler-Dayton ’17 is documenting </span><span style="font-weight:400">the Jeffers Petroglyphs, a North American indigenous rock-art site located in southwestern Minnesota.</span></p> <p>Advanced photogrammetry is a type of 3D modeling that constructs the depth of an object by measuring the distance between photos taken of it. These digital tools, Hubler-Dayton says, “encompass both the scientific and the artistic.”</p> <p>Hubler-Dayton’s work is part of a collaborative research project at the Jeffers Petroglyphs initiated by St. Olaf Professor of History and Ancient Studies Tim Howe. This project brings together indigenous tribal groups, scholars, and undergraduate students to preserve the cultural heritage of the site through traditional excavation as well as advanced photogrammetry.</p> <p>With these digital tools, archaeologists “get a clearer image than they get with the naked eye,” says Hubler-Dayton. “The rock carvings at Jeffers are barely visible for about an hour in the morning, between 5:30 and 6:30.”</p> <p><span style="font-weight:400">In order to learn about advanced photogrammetry, Hubler-Dayton spent a week with Howe at </span><a href="http://culturalheritageimaging.org/">Cultural Heritage Imaging</a><span style="font-weight:400">, an organization dedicated to advancing the state of digital documentation. Cultural Heritage Imaging offers technology, tools, and training for cultural stewards, such as Howe and Hubler-Dayton.</span></p> <div style="width:495px"><img src="http://wp.stolaf.edu/wp-content/uploads/2016/12/HublerDaytonJackWorksite485x300.jpg" width="485" height="300"><p>Jack Hubler-Dayton ’17 took this photo while at the site of the Jeffers Petroglyphs, where he is participating in a collaborative research project initiated by St. Olaf Professor of History and Ancient Studies Tim Howe. Hubler-Dayton and Minnesota Historical Society staff members are observing the alignment of a petroform (human-placed rock) with the sunrise of the summer solstice.</p></div> <p>Now, Howe and Hubler-Dayton are bringing these digital tools back to St. Olaf, where Howe is teaching a new course at the Jeffers Petroglyphs. This course is designed to expose students to methodologies and field practices employed by archaeologists when studying North American indigenous cultures. And with it, St. Olaf will become one of only a handful of institutions in the country that offer training in advanced photogrammetry.</p> <p>With advanced photogrammetry and other methods, those involved with the research project are inventorying thousands of rock carvings at Jeffers, one of the most extensive collections of petroglyphs found in North America.</p> <p>Jeffers, situated on a 30-mile long outcrop of Sioux quartzite, includes images of humans, buffalo, turtles, thunderbirds, and arrows. And the carvings tell a story that spans more than 10,000 years.</p> <div style="width:360px"><img src="http://wp.stolaf.edu/wp-content/uploads/2016/12/HublerDaytonJack350x450.jpg" width="350" height="450"><p>Jack Hubler-Dayton ’17 at the Antiochia Ad Cragum Site in Turkey, where he was able to gain hands-on experience in archaeology as part of a program led by St. Olaf faculty member Tim Howe.</p></div> <p>The petroglyphs are, in Hubler-Dayton’s words, “a living, speaking record of prehistoric religion, history, and thought.”</p> <p>“Jeffers is a sacred site first and foremost,” he says. “It’s a holy place for many North American tribes, including Dakota and other Siouan people. I feel like I am most accountable to these tribe in my work, and I don’t do anything without the permission of tribal elders.”</p> <p>Hubler-Dayton, who is pursuing a history major as well as an individual major, says that his experiences at St. Olaf have prepared him well to work at the Jeffers Petroglyphs. He participated in the Collaborative Undergraduate Research and Inquiry (CURI) program and did field work at the Antiochia Ad Cragum Site in Turkey through the Mediterranean Field School. He also presented his work at the North Plains History Conference, for which he received funding from the college.</p> <p>As an individual major, Hubler-Dayton has found that “St. Olaf has been really supportive in all of my independent studies. And in the classes that I can take, I talk to my professors about how I can integrate Jeffers into my work.”</p> <p>“What this project has taught me is that we need to preserve the earth and respect it from a spiritual, and civic duty,” says Hubler-Dayton.</p> <p>“We have to be in this together, preserving what’s left ecologically, historically, and culturally.”</p>' | |
}; | |
suite.add("var reImg = /<img.*src=[\"'](.*?)[\"'].*?>/g", function () { | |
var reImg = /<img.*src=["'](.*?)["'].*?>/g | |
var reUrl = /^https?:\/\/[^\s/$.?#].[^\s]*$/ | |
var images = data.match(reImg) | |
if (!images) { | |
return | |
} | |
var imageUrls = images.map(tag => reImg.exec(tag)).map(matchGroup => matchGroup[1]) | |
var validUrls = imageUrls.filter(url => reUrl.test(url)) | |
}); | |
suite.add("var reImg = /<img.*src=[\"'](.*?)[\"'].*?>", function () { | |
var reImg = /<img.*src=["'](.*?)["'].*?>/ | |
var reUrl = /^https?:\/\/[^\s/$.?#].[^\s]*$/ | |
var image = data.match(reImg) | |
if (!image) { | |
return | |
} | |
var imageUrl = reImg.exec(image)[1] | |
var validUrl = reUrl.exec(imageUrl) | |
}); | |
suite.add("var dom = window.htmlparser2.parseDOM(string, {", function () { | |
var dom = window.htmlparser2.parseDOM(string, { | |
withDomLvl1: true, | |
normalizeWhitespace: false, | |
xmlMode: false, | |
decodeEntities: true, | |
}) | |
var url = window.cssSelect('img[src]', dom)[0].attribs.src | |
}); | |
suite.on("cycle", function (evt) { | |
console.log(" - " + evt.target); | |
}); | |
suite.on("complete", function (evt) { | |
console.log(new Array(30).join("-")); | |
var results = evt.currentTarget.sort(function (a, b) { | |
return b.hz - a.hz; | |
}); | |
results.forEach(function (item, idx) { | |
console.log((idx + 1) + ". " + item); | |
}); | |
}); | |
console.log("Untitled benchmark"); | |
console.log(new Array(30).join("-")); | |
suite.run(); | |
}); |
Was talking to a buddy of mine about betting apps, and he mentioned this site. I checked out the app at https://satbetapp.in/app/ , and it's been pretty solid. It's an Indian platform, which I liked, and they've got a good variety of games and sports. The promotions and bonuses are a big plus, feels like there's always something new to check out. It's made watching sports with friends a bit more thrilling, we even have a small betting pool going now.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my quest for the perfect online casino, I stumbled across a platform that has truly revolutionized the gaming experience. This particular platform offers a unique pay n play concept that eliminates the need for time-consuming sign-ups. I'm able to dive straight into the games, and the variety is just mind-blowing. Everything from classic slots to poker and even live casino games for that real-life casino experience. The website's design is clean and navigation is straightforward. Plus, the customer support is top-notch.