{"id":26162363,"url":"https://github.com/wollmers/lcs-bv","last_synced_at":"2025-07-13T20:34:25.993Z","repository":{"id":32666704,"uuid":"36255066","full_name":"wollmers/LCS-BV","owner":"wollmers","description":"Longest Common Subsequence implemented with Bit-Vectors","archived":false,"fork":false,"pushed_at":"2020-06-24T18:53:59.000Z","size":89,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T13:54:23.933Z","etag":null,"topics":["asm","bit-vector","lcs","llcs","matching-algorithm"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wollmers.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-25T21:19:04.000Z","updated_at":"2022-01-24T07:07:16.000Z","dependencies_parsed_at":"2022-08-28T20:10:34.643Z","dependency_job_id":null,"html_url":"https://github.com/wollmers/LCS-BV","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/wollmers/LCS-BV","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wollmers%2FLCS-BV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wollmers%2FLCS-BV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wollmers%2FLCS-BV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wollmers%2FLCS-BV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wollmers","download_url":"https://codeload.github.com/wollmers/LCS-BV/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wollmers%2FLCS-BV/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265200074,"owners_count":23726768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asm","bit-vector","lcs","llcs","matching-algorithm"],"created_at":"2025-03-11T13:54:10.535Z","updated_at":"2025-07-13T20:34:25.967Z","avatar_url":"https://github.com/wollmers.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nLCS::BV - Bit Vector (BV) implementation of the\n                 Longest Common Subsequence (LCS) Algorithm\n\n\u003cdiv\u003e\n    \u003ca href=\"https://travis-ci.org/wollmers/LCS-BV\"\u003e\u003cimg src=\"https://travis-ci.org/wollmers/LCS-BV.png\" alt=\"LCS-BV\"\u003e\u003c/a\u003e\n    \u003ca href='https://coveralls.io/r/wollmers/LCS-BV?branch=master'\u003e\u003cimg src='https://coveralls.io/repos/wollmers/LCS-BV/badge.png?branch=master' alt='Coverage Status' /\u003e\u003c/a\u003e\n    \u003ca href='http://cpants.cpanauthors.org/dist/LCS-BV'\u003e\u003cimg src='http://cpants.cpanauthors.org/dist/LCS-BV.png' alt='Kwalitee Score' /\u003e\u003c/a\u003e\n    \u003ca href=\"http://badge.fury.io/pl/LCS-BV\"\u003e\u003cimg src=\"https://badge.fury.io/pl/LCS-BV.svg\" alt=\"CPAN version\" height=\"18\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n# SYNOPSIS\n\n    use LCS::BV;\n\n    $object = LCS::BV-\u003enew;\n    @lcs    = $object-\u003eLCS(\\@a,\\@b);\n\n    $llcs   = $object-\u003eLLCS(\\@a,\\@b);\n\n    $positions = $object-\u003eprepare(\\@a);\n    $llcs      = $object-\u003eLLCS_prepared($positions,\\@b);\n\n# ABSTRACT\n\nLCS::BV implements Algorithm::Diff using bit vectors and\nis faster in most cases, especially on strings with a length shorter\nthan the used wordsize of the hardware (32 or 64 bits).\n\n# DESCRIPTION\n\n## CONSTRUCTOR\n\n- new()\n\n    Creates a new object which maintains internal storage areas\n    for the LCS computation. Use one of these per concurrent\n    LCS() call.\n\n## METHODS\n\n- LLCS(\\\\@a,\\\\@b)\n\n    Return the length of a Longest Common Subsequence, taking two arrayrefs as method\n    arguments. It returns an integer.\n\n- LCS(\\\\@a,\\\\@b)\n\n    Finds a Longest Common Subsequence, taking two arrayrefs as method\n    arguments. It returns an array reference of corresponding\n    indices, which are represented by 2-element array refs.\n\n- prepare(\\\\@a)\n\n    For comparison of the same sequence @a many times against different sequences @b\n    it can be faster to prepare @a. It returns a hashref of positions.\n    This works only on object mode.\n\n- LLCS\\_prepared($positions,\\\\@b)\n\n    Return the length of a Longest Common Subsequence, with one side prepared.\n    It returns an integer. It is two times faster than LLCS().\n\n## EXPORT\n\nNone by design.\n\n# STABILITY\n\nUntil release of version 1.00 the included methods, names of methods and their\ninterfaces are subject to change.\n\nBeginning with version 1.00 the specification will be stable, i.e. not changed between\nmajor versions.\n\n# REFERENCES\n\nH. Hyyroe. A Note on Bit-Parallel Alignment Computation.\nIn M. Simanek and J. Holub, editors, Stringology, pages 79-87. Department\nof Computer Science and Engineering, Faculty of Electrical\nEngineering, Czech Technical University, 2004.\n\n# SPEED COMPARISON\n\n    Intel Core i7-4770HQ Processor\n    Intel® SSE4.1, Intel® SSE4.2, Intel® AVX2\n    4 Cores, 8 Threads\n    2.20 - 3.40 GHz\n    6 MB Cache\n    16 GB DDR3 RAM\n\nLCS-BV/xt$ perl 50\\_diff\\_bench.t\n\nLCS: Algorithm::Diff, Algorithm::Diff::XS, LCS, LCS::BV\n\nLCS: \\[Chrerrplzon\\] \\[Choerephon\\]\n\n                Rate      LCS:LCS    AD:LCSidx AD:XS:LCSidx   LCS:BV:LCS\nLCS:LCS       9225/s           --         -72%         -87%         -88%\nAD:LCSidx    33185/s         260%           --         -53%         -58%\nAD:XS:LCSidx 70447/s         664%         112%           --         -12%\nLCS:BV:LCS   79644/s         763%         140%          13%           --\n\nLCS: \\[qw/a b d/ x 50\\], \\[qw/b a d c/ x 50\\]\n\n               Rate      LCS:LCS    AD:LCSidx   LCS:BV:LCS AD:XS:LCSidx\nLCS:LCS      49.5/s           --         -37%         -96%         -99%\nAD:LCSidx    79.0/s          60%           --         -94%         -98%\nLCS:BV:LCS   1255/s        2434%        1488%           --         -69%\nAD:XS:LCSidx 4073/s        8124%        5052%         224%           --\n\nLLCS: \\[Chrerrplzon\\] \\[Choerephon\\]\n\n                     Rate    LCS:LLCS AD:LCS_length AD:XS:LCS_length LCS:BV:LLCS\nLCS:LLCS          11270/s          --          -70%             -70%        -92%\nAD:LCS_length     37594/s        234%            --              -1%        -75%\nAD:XS:LCS_length  38059/s        238%            1%               --        -74%\nLCS:BV:LLCS      148945/s       1222%          296%             291%          --\n\nLLCS: \\[qw/a b d/ x 50\\], \\[qw/b a d c/ x 50\\]\n\n                   Rate     LCS:LLCS AD:LCS_length AD:XS:LCS_length  LCS:BV:LLCS\nLCS:LLCS         50.0/s           --          -37%             -37%         -98%\nAD:LCS_length    79.2/s          58%            --              -1%         -97%\nAD:XS:LCS_length 79.8/s          60%            1%               --         -97%\nLCS:BV:LLCS      2357/s        4614%         2874%            2853%           --\n\n# SOURCE REPOSITORY\n\n[http://github.com/wollmers/LCS-BV](http://github.com/wollmers/LCS-BV)\n\n# SEE ALSO\n\nAlgorithm::Diff\nLCS\nLCS::Tiny\n\n# AUTHOR\n\nHelmut Wollmersdorfer \u003chelmut.wollmersdorfer@gmail.com\u003e\n\n\u003cdiv\u003e\n    \u003ca href='http://cpants.cpanauthors.org/author/wollmers'\u003e\u003cimg src='http://cpants.cpanauthors.org/author/wollmers.png' alt='Kwalitee Score' /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n# COPYRIGHT AND LICENSE\n\nCopyright 2014-2020 by Helmut Wollmersdorfer\n\nThis library is free software; you can redistribute it and/or modify\nit under the same terms as Perl itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwollmers%2Flcs-bv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwollmers%2Flcs-bv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwollmers%2Flcs-bv/lists"}