From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 44386 invoked by alias); 14 Nov 2016 12:50:40 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 44351 invoked by uid 89); 14 Nov 2016 12:50:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=adhemerval, Zanella, zanella, adhemerval.zanella@linaro.org X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com From: Wilco Dijkstra To: Adhemerval Zanella , "libc-alpha@sourceware.org" CC: nd Subject: Re: [PATCH] Improve strtok(_r) performance Date: Mon, 14 Nov 2016 12:50:00 -0000 Message-ID: References: , In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-microsoft-exchange-diagnostics: 1;AM5PR0802MB2609;7:QQptv9EOFFZ5aW5PHN45JczQD1v1F0d/shy4JcdtGlxBYAkIZ3shaeQQnlRd9a26pc1agXbCYkxwfy6yAVT/DeZkya7pwQeGiC4OSDHnDPap8gfTx1AP/lxlEDpmzC2ugKA7EuVyDYQT/Ho+km7hYf6AANoMyUgqeiV9Qx0YL5qEM4SZcoDnMqr1PjMHsl86QeODybY+TGDvMmpk35GJ2iQE77S3nHrSvjaDSjJOrimh7H0fmXoXufh2l1XiB7JYaP6G5q7md4HWCjn3363bbH1oNpnkcpbg5VFnTmxe6NpJFzlxxnw3woonBJ+l1mg8qhACKQzdyGm8xmZ6w9Lc3eaYF+7xjGxc5PZKlQGQyfM= x-ms-office365-filtering-correlation-id: 27e16031-809d-43d9-07e1-08d40c8cccc7 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:AM5PR0802MB2609; nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6060326)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6061321);SRVR:AM5PR0802MB2609;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0802MB2609; x-forefront-prvs: 0126A32F74 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(336003)(24454002)(199003)(189002)(558084003)(586003)(77096005)(2501003)(3280700002)(81156014)(33656002)(81166006)(6116002)(189998001)(2900100001)(8936002)(5001770100001)(86362001)(3660700001)(87936001)(66066001)(76576001)(5660300001)(2950100002)(7696004)(97736004)(4326007)(106356001)(7736002)(68736007)(229853002)(2906002)(92566002)(106116001)(54356999)(76176999)(74316002)(9686002)(122556002)(101416001)(8676002)(50986999)(305945005)(7846002)(102836003)(105586002)(3846002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0802MB2609;H:AM5PR0802MB2610.eurprd08.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2016 12:50:23.5792 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2609 X-SW-Source: 2016-11/txt/msg00456.txt.bz2 Adhemerval Zanella wrote: > Why not aim for simplicity and just use strtok_r and strtok? I should > be a tail call in most architecture and performance loss should be > minimum. You mean avoiding the duplication of code? Say inlining or tailcalling strtok_r in string/strtok_r.c? Wilco