From 86bad61b76a260ffc442acffbe58feee67df45e5 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 24 Mar 2012 11:24:16 -0700 Subject: Sync from internal Google development. Many improvements, too many to mention. One significant perf regression warrants investigation: omitfp.parsetoproto2_googlemessage1.upb_jit: 343 -> 252 (-26.53) plain.parsetoproto2_googlemessage1.upb_jit: 334 -> 251 (-24.85) 25% regression for this benchmark is bad, but since I don't think there's any fundamental design issue that caused it I'm going to go ahead with the commit anyway. Can investigate and fix later. Other benchmarks were neutral or showed slight improvement. --- upb/bytestream.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'upb/bytestream.h') diff --git a/upb/bytestream.h b/upb/bytestream.h index fe049d2..3217ee1 100644 --- a/upb/bytestream.h +++ b/upb/bytestream.h @@ -372,8 +372,7 @@ INLINE int upb_bytesink_putc(upb_bytesink *sink, char ch) { } INLINE int upb_bytesink_putrepeated(upb_bytesink *sink, char ch, int len) { - int i; - for (i = 0; i < len; i++) + for (int i = 0; i < len; i++) if (upb_bytesink_write(sink, &ch, 1) < 0) return -1; return len; @@ -436,7 +435,8 @@ typedef struct { FILE *file; bool should_close; upb_stdio_buf **bufs; - uint32_t nbuf, szbuf; + int nbuf; + uint32_t szbuf; } upb_stdio; void upb_stdio_init(upb_stdio *stdio); -- cgit v1.2.3