From 4617b092f083becd16e523a499835026bd8dc0ce Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Tue, 13 Jun 2023 22:54:28 -0700 Subject: [PATCH] deepcopy is really slow and actually unnecessary here --- src/openpower/fpscr.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/openpower/fpscr.py b/src/openpower/fpscr.py index d4e8a1d7..edfcfaca 100644 --- a/src/openpower/fpscr.py +++ b/src/openpower/fpscr.py @@ -136,9 +136,7 @@ class FPSCRState(SelectableInt): offs = 0 # set up sub-fields from Record layout self.fsi = {} - l = deepcopy(FPSCRRecord.layout) - l.reverse() - for field, width in l: + for field, width in reversed(FPSCRRecord.layout): if field == "FPRF": v = FPSCR_FPRF(self, tuple(range(47, 52))) end = 52 -- 2.30.2