Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2844218BC1 for ; Wed, 18 Nov 2015 10:40:12 +0000 (UTC) Received: (qmail 40934 invoked by uid 500); 18 Nov 2015 10:40:11 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 40742 invoked by uid 500); 18 Nov 2015 10:40:11 -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 40570 invoked by uid 99); 18 Nov 2015 10:40:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Nov 2015 10:40:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2C5DA2C1F73 for ; Wed, 18 Nov 2015 10:40:11 +0000 (UTC) Date: Wed, 18 Nov 2015 10:40:11 +0000 (UTC) From: "Aleksei Dievskii (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (MATH-1293) Tabulating the logarithmic factorial MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Aleksei Dievskii created MATH-1293: -------------------------------------- Summary: Tabulating the logarithmic factorial Key: MATH-1293 URL: https://issues.apache.org/jira/browse/MATH-1293 Project: Commons Math Issue Type: Improvement Affects Versions: 3.5 Reporter: Aleksei Dievskii Priority: Minor Presently, CombinatoricsUtils#factorialLog is calculated via a tabulated value for the first 21 entries, and for the rest it employs linear-complexity direct summing. For the factorial-heavy computations this can be rather painful. I propose a patch which allocates additional 16KB of tabulated log-factorial values, allowing very fast (constant complexity) computation for arguments up to 17000, and delegating to the log-gamma for the rest. Benchmarks show a speed-up of up to 200x. -- This message was sent by Atlassian JIRA (v6.3.4#6332)