This file contains 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
# Remember to pass `--profile.api` to JRuby: | |
# jruby --profile.api prof.rb | |
require "jruby/profiler" | |
def main | |
prof = JRuby::Profiler.profile do | |
puts(f1) | |
puts(f2) | |
end |
This file contains 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
func timeIt(function: ()->()) -> Double { | |
var startTime = NSDate() | |
function() | |
return -startTime.timeIntervalSinceNow | |
} | |
let N = 800 | |
var B = [Float](count: N, repeatedValue: 0) | |
elapsed = timeIt({ |