Skip to content

Instantly share code, notes, and snippets.

View therealarcher's full-sized avatar

Jonathan Archer therealarcher

View GitHub Profile
def benchmark
# Your benchmarking code goes here.
start_time = Time.now
yield
end_time = Time.now
total_time = end_time - start_time
return total_time
end
# Be careful, pasting this into IRB will take a long time to print.
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>