From 03dfb3bd227310d47315fb2f17bee1c00f7ea17e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Forst=C3=A9n?= Date: Sat, 29 Jun 2013 21:29:40 +0200 Subject: [PATCH] numparm, speedup modernizeex() for the common case --- src/frontend/numparam/spicenum.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frontend/numparam/spicenum.c b/src/frontend/numparam/spicenum.c index 5010c6470..4b98d5062 100644 --- a/src/frontend/numparam/spicenum.c +++ b/src/frontend/numparam/spicenum.c @@ -243,6 +243,11 @@ modernizeex(SPICE_DSTRINGPTR dstr_p) state = 0; ls = spice_dstring_length(dstr_p); s = spice_dstring_value(dstr_p); + + /* check if string might need modernizing */ + if (!memchr(s, Intro, (size_t) ls)) + return; + spice_dstring_init(&t); while (i < ls) {