Mercurial > jwe > octave
view .dir-locals.el @ 31112:bbb59cc6698c stable
factor.m: Performance tweak to avoid division in certain cases
factor.m: For large numbers where only one factor lies outside the fast
first round of divisions, check if it is prime before calling primes ()
trying to factorize it. This is up to 8000X faster for such numbers,
and for an "average" input it gives a 22% to 40% speedup over a large
number of trials.
author | Arun Giridhar <arungiridhar@gmail.com> |
---|---|
date | Sat, 25 Jun 2022 16:40:36 -0400 |
parents | df203b20cfc6 |
children |
line wrap: on
line source
((nil . ((c-file-style . "gnu") (indent-tabs-mode . nil) (fill-column . 72))) (change-log-mode . ((indent-tabs-mode . t))) (makefile-mode . ((indent-tabs-mode . t))))