Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Filter::Util::Call the default engine for PDL::NiceSlice #74

Merged
merged 1 commit into from Mar 15, 2015

Conversation

devel-chm
Copy link
Member

This is the original source filter implementation. The more
correct one using Filter::Simple is too slow. Work to fix is
underway but postponed for PDL-2.009

This is the original source filter implementation.  The more
correct one using Filter::Simple is too slow.  Work to fix is
underway but postponed for PDL-2.009
## TODO: Add configuration argument to perldl.conf
## $PDL::NiceSlice::engine = $engine_ok{'Filter::Util::Call'}; # default engine type
$PDL::NiceSlice::engine = $engine_ok{'Filter::Util::Call'}; # default engine type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a pity this is necessary for now, but evidently it is. We should probably add a test exercising the case in #25 / https://sourceforge.net/p/pdl/bugs/238/

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.28%) to 49.01% when pulling 27764a1 on niceslicerevert into 31266c2 on master.

@wchristian wchristian merged commit 27764a1 into master Mar 15, 2015
@mohawk2 mohawk2 deleted the niceslicerevert branch March 15, 2015 16:47
@wchristian wchristian restored the niceslicerevert branch March 22, 2015 20:23
@mohawk2 mohawk2 deleted the niceslicerevert branch March 22, 2015 21:11
@mohawk2
Copy link
Member

mohawk2 commented Jan 2, 2022

It's not 100% clear to me why the Filter::Simple version was so slow (the tests took about 900ms on my machine with that, vs about 220ms with the old one). However, inserting timing outputs showed MatrixOps was loading PDL::NiceSlice. After making that not be the case with 6ae4c0e, the difference went from about +300% to about +10%.

Given that the old version was broken with strings (including SQL), POD, and even comments with partial "nice slice" syntax, that is a price entirely worth paying. Therefore I have switched the default to the Filter::Simple with 4a790d9, which finally fixes this problem, and #25 and #32.

@mohawk2
Copy link
Member

mohawk2 commented Jan 28, 2022

The Filter::Simple implementation was in fact very slow on bigger files (such as the 6700-line PDL::LinearAlgebra taking 10s to load). Analysis revealed this was due to a performance bug in Text::Balanced, worked around in PDL with 31b991b and the same change submitted to Text::Balanced itself with steve-m-hay/Text-Balanced#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants