From 01316199737a09987ce8f8d97cbbe2bd5a2a335f Mon Sep 17 00:00:00 2001 From: zzj <29055749+zjzh@users.noreply.github.com> Date: Sun, 23 Jan 2022 00:01:32 +0800 Subject: [PATCH] refactoring code with Assign Multiple Targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refactoring code with Assign Multiple Targets which is more pythonic, concise, readable and efficient; how do think this change which has practical value? --- .../data-files/benchmarks/bm_scimark/run_benchmark.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pyperformance/data-files/benchmarks/bm_scimark/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_scimark/run_benchmark.py index 0928a643..21724f96 100644 --- a/pyperformance/data-files/benchmarks/bm_scimark/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_scimark/run_benchmark.py @@ -343,12 +343,7 @@ def FFT_bitreverse(N, data): jj = j << 1 k = n >> 1 if i < j: - tmp_real = data[ii] - tmp_imag = data[ii + 1] - data[ii] = data[jj] - data[ii + 1] = data[jj + 1] - data[jj] = tmp_real - data[jj + 1] = tmp_imag + data[ii] , data[ii + 1] , data[jj] , data[jj + 1] = data[jj], data[jj + 1], data[ii], data[ii + 1] while k <= j: j -= k k >>= 1