Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 800361669AC for ; Tue, 25 Jul 2017 14:06:05 +0200 (CEST) Received: (qmail 77911 invoked by uid 500); 25 Jul 2017 12:06:04 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 77900 invoked by uid 99); 25 Jul 2017 12:06:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jul 2017 12:06:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 177D41A0505 for ; Tue, 25 Jul 2017 12:06:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id XUDInoMCZQg7 for ; Tue, 25 Jul 2017 12:06:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 64BC961070 for ; Tue, 25 Jul 2017 12:06:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 70173E0E64 for ; Tue, 25 Jul 2017 12:06:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6B9C623F7F for ; Tue, 25 Jul 2017 12:06:00 +0000 (UTC) Date: Tue, 25 Jul 2017 12:06:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TEXT-98) Remove isDelimiter() and use HashSets for delimiter check MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TEXT-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16099935#comment-16099935 ] ASF GitHub Bot commented on TEXT-98: ------------------------------------ Github user chtompki commented on the issue: https://github.com/apache/commons-text/pull/57 This all opens the question about going `2.x`. I think we have a couple of things that would warrant a 2.x move. Do we want to attempt that in the fall, or is it still too premature? > Remove isDelimiter() and use HashSets for delimiter check > --------------------------------------------------------- > > Key: TEXT-98 > URL: https://issues.apache.org/jira/browse/TEXT-98 > Project: Commons Text > Issue Type: Improvement > Affects Versions: 1.1 > Reporter: Arun Vinud > Priority: Minor > Fix For: 1.2 > > > The current implementation of *capitalize*, *uncapitalize* and *initials* in *WordUtils* calls *isDelimiter* for every character and/or codepoint and isDelimiter loops through the array of delimiters to check for the occurrence. This is a bit inefficient and results in O(nk) complexity and it can be reduced to O( n )[if n>k] or O( k ) [if k>n]. -- This message was sent by Atlassian JIRA (v6.4.14#64029)