mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #564] [MERGED] Memory optimization in HARDSUBX edit_distance #1399
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/564
Author: @Izaron
Created: 12/22/2016
Status: ✅ Merged
Merged: 12/23/2016
Merged by: @cfsmp3
Base:
master← Head:edit-distance-mem📝 Commits (1)
892edfeMemory optimization in edit_distance📊 Changes
1 file changed (+29 additions, -14 deletions)
View changed files
📝
src/lib_ccx/hardsubx_utility.c(+29 -14)📄 Description
I have made memory optimization in function edit_distance. This function is calls often in hardsubx, and works for
O(len^2)time andO(len^2)memory. But in fact we can work with two massives with size len instead of len. With my commit it works now with massive with size of 2*min(len1,len2).For example, in this two videos: https://abhinavshukla95.wordpress.com/2016/08/18/google-summer-of-code-work-product-submission/ We have maximum wasting of memory in first video 59x59 ints ans in second video 87x98 with example arguments. With my commit we can use memory of 2x59 ints and 2x87 ints respectively.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.