Construct OperationAttributeLookup
Performance Diagrams
Source Code with Construct
# construct_end s.append return s, local_value for x in itertools.repeat(None, 25000): calledRepeatedly() print("OK.") # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
Source Code without Construct
s.append return s, local_value for x in itertools.repeat(None, 25000): calledRepeatedly() print("OK.") # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
Context Diff of Source Code
Construct | Baseline | ||||
---|---|---|---|---|---|
14 | local_value = module_value1 | 14 | local_value = module_value1 | ||
15 | 15 | ||||
16 | s = module_value1 | 16 | s = module_value1 | ||
17 | s.append | 17 | s.append | ||
18 | # construct_begin | 18 | # construct_begin | ||
t | 19 | s.append | t | 19 | |
20 | # construct_end | 20 | |||
21 | s.append | 21 | s.append | ||
22 | 22 | ||||
23 | return s, local_value | 23 | return s, local_value | ||
24 | 24 | ||||
25 | 25 |
Context Diff of Generated Code
Construct | Baseline | ||||
---|---|---|---|---|---|
238 | assert(HAS_ERROR_OCCURRED(tstate)); | 238 | assert(HAS_ERROR_OCCURRED(tstate)); | ||
239 | 239 | ||||
240 | FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb); | 240 | FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb); | ||
241 | 241 | ||||
242 | 242 | ||||
n | 243 | exception_lineno = 19; | n | ||
244 | type_description_1 = "oo"; | ||||
245 | goto frame_exception_exit_1; | ||||
246 | } | ||||
247 | Py_DECREF(tmp_attribute_value_2); | ||||
248 | } | ||||
249 | { | ||||
250 | PyObject *tmp_expression_value_3; | ||||
251 | PyObject *tmp_attribute_value_3; | ||||
252 | CHECK_OBJECT(var_s); | ||||
253 | tmp_expression_value_3 = var_s; | ||||
254 | tmp_attribute_value_3 = LOOKUP_ATTRIBUTE(tstate, tmp_expression_value_3, mod_consts[1]); | ||||
255 | if (tmp_attribute_value_3 == NULL) { | ||||
256 | assert(HAS_ERROR_OCCURRED(tstate)); | ||||
257 | |||||
258 | FETCH_ERROR_OCCURRED(tstate, &exception_type, &exception_value, &exception_tb); | ||||
259 | |||||
260 | |||||
261 | exception_lineno = 21; | 243 | exception_lineno = 21; | ||
262 | type_description_1 = "oo"; | 244 | type_description_1 = "oo"; | ||
263 | goto frame_exception_exit_1; | 245 | goto frame_exception_exit_1; | ||
264 | } | 246 | } | ||
t | 265 | Py_DECREF(tmp_attribute_value_3); | t | 247 | Py_DECREF(tmp_attribute_value_2); |
266 | } | 248 | } | ||
267 | 249 | ||||
268 | 250 | ||||
269 | // Put the previous frame back on top. | 251 | // Put the previous frame back on top. | ||
270 | popFrameStack(tstate); | 252 | popFrameStack(tstate); |