From 7b6492c0e26d25c0d683241a7cc95859cc5e728d Mon Sep 17 00:00:00 2001 From: goyuken Date: Thu, 6 Jun 2013 00:59:09 +0000 Subject: [PATCH] n64: use the "fast" savestate text processing primitives. overall speedup: savestate: 21x loadstate: 10x --- BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs b/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs index 00dca805df..28bc4629b7 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/N64/N64.cs @@ -145,7 +145,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64 public void SaveStateText(TextWriter writer) { var temp = SaveStateBinary(); - temp.SaveAsHex(writer); + temp.SaveAsHexFast(writer); // write extra copy of stuff we don't use writer.WriteLine("Frame {0}", Frame); } @@ -162,7 +162,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64 hex = reader.ReadLine(); } byte[] state = new byte[hex.Length / 2]; - state.ReadFromHex(hex); + state.ReadFromHexFast(hex); LoadStateBinary(new BinaryReader(new MemoryStream(state))); }