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

New M4 filter. #8

Merged
merged 3 commits into from
Apr 20, 2018
Merged

New M4 filter. #8

merged 3 commits into from
Apr 20, 2018

Conversation

lemzwerg
Copy link
Contributor

The code is mainly taken from the cpp stuff, with suitable adaptions.

This is my first Perl code contribution ever; there might still be problems...

Grüße aus Wien :-)

@rurban rurban self-requested a review March 17, 2018 19:49
@rurban rurban self-assigned this Mar 17, 2018
@rurban
Copy link
Owner

rurban commented Mar 17, 2018

Idea looks great. I'll check if the tests will really survive all architectures.

@lemzwerg
Copy link
Contributor Author

Here's a sample that demonstrates its usage

http://repo.or.cz/wortliste.git/blob/HEAD:/skripte/perl/wl-new2old.pl

(it provides the M4 filtering code in a local module).

Using M4 instead of subroutines makes the script at least 20% faster. The German word list to be processed has almost 500000 lines which makes this significant.

In case you want to actually run the script: The input file can be generated with

skripte/umformatierung.py -k wortliste > wlst

@rurban
Copy link
Owner

rurban commented Mar 27, 2018

I see, that's a convincing argument.

@rurban rurban merged commit 88c6157 into rurban:master Apr 20, 2018
@rurban
Copy link
Owner

rurban commented Apr 20, 2018

Thanks

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.

2 participants