From: Jacob Lifshay Date: Wed, 14 Jun 2023 05:54:28 +0000 (-0700) Subject: deepcopy is really slow and actually unnecessary here X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=14f508cb2b158244dd5098c474aa408ac6ad7dc0;p=openpower-isa.git deepcopy is really slow and actually unnecessary here --- 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