mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	add vm_ivar_of_class_set
benchmark for a class's ivar setter
This commit is contained in:
		
							parent
							
								
									acb23454e5
								
							
						
					
					
						commit
						a7776077be
					
				
				
				Notes:
				
					git
				
				2021-10-23 01:33:20 +09:00 
				
			
			
			
		
		
					 1 changed files with 11 additions and 0 deletions
				
			
		
							
								
								
									
										11
									
								
								benchmark/vm_ivar_of_class_set.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								benchmark/vm_ivar_of_class_set.yml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
prelude: |
 | 
			
		||||
  class C
 | 
			
		||||
    @a = 1
 | 
			
		||||
    def self.a o
 | 
			
		||||
      @a = o; @a = o; @a = o; @a = o; @a = o; @a = o;
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
benchmark:
 | 
			
		||||
  vm_ivar_of_class_set: |
 | 
			
		||||
    a = C.a(nil)
 | 
			
		||||
loop_count: 30000000
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue