mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			9 lines
		
	
	
	
		
			209 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
	
		
			209 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
prelude: |
 | 
						|
  # based on benchmark for [ruby-core:65518] [Feature #10341] by Knut Franke
 | 
						|
  fib = Fiber.new do
 | 
						|
    loop { Fiber.yield }
 | 
						|
  end
 | 
						|
benchmark:
 | 
						|
  vm2_fiber_switch: |
 | 
						|
    fib.resume
 | 
						|
loop_count: 20000000
 |