mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Backing out the fast path for interned string compares again as requested.
This commit is contained in:
		
							parent
							
								
									25ee87cc50
								
							
						
					
					
						commit
						4962fc8fed
					
				
					 1 changed files with 0 additions and 15 deletions
				
			
		|  | @ -1778,21 +1778,6 @@ eval_frame(PyFrameObject *f) | |||
| 				x = res ? Py_True : Py_False; | ||||
| 				Py_INCREF(x); | ||||
| 			} | ||||
| 			else if (v == w && PyString_CheckExact(v)) { | ||||
| 			    	/* Fast-path for comparing interned strings */ | ||||
| 				switch (oparg) { | ||||
| 				case EQ: x = Py_True; break; | ||||
| 				case LE: x = Py_True; break; | ||||
| 				case GE: x = Py_True; break; | ||||
| 				case NE: x = Py_False; break; | ||||
| 				case GT: x = Py_False; break; | ||||
| 				case LT: x = Py_False; break; | ||||
| 				case IS: x = Py_True; break; | ||||
| 				case IS_NOT: x = Py_False; break; | ||||
| 				default: goto slow_compare; | ||||
| 				} | ||||
| 				Py_INCREF(x); | ||||
| 			} | ||||
| 			else { | ||||
| 			  slow_compare: | ||||
| 				x = cmp_outcome(oparg, v, w); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Marc-André Lemburg
						Marc-André Lemburg