r/computerscience • • 2d ago

A new Lines Sort process called Sets

Sets and the other methods described here are Patent Pending and some have been previously released as MIT Licensed, all rights reserved.

Sets has become an interesting and powerful tool where it sorts easy items from difficult items (best laymans speak I can do). This method of sorting makes almost any software seeming very efficient and quick to run.

Speed advantage over the best competitor, worked out from the measured times:

• Genomics (Harr-Gene read cleanup): about 140–145% faster than cutadapt, the fastest opponent (2.8 s vs 6.9 s on E. coli, 4.1 s vs 9.8 s on human). Duplicate removal is only 4–10% faster than FastDedup.

• AI filter: used as a pre-filter in front of datatrove, the whole job ran about 109% faster (712 s vs 1,485 s). Running by itself on text files, it was about 8,500% faster than datatrove (3 s vs 259 s). It agreed with datatrove on only about 83% of the pages it kept, though, so that figure isn't a like-for-like comparison.

• Network security (S-Rank Network): compared with Snort running on one thread, about 470% faster on Tuesday's traffic (18.3 s vs 104.3 s) and about 310% faster on Wednesday's (25.9 s vs 105.8 s). The Suricata version was 14% faster on Tuesday but 10% slower on Thursday.

• 5G (MHARR Packet vs VPP, real 5G capture): about 39% faster at forwarding and about 91% faster at GTP-U downlink, measured in clock cycles per packet. Against DPDK's l3fwd it was level, about 1% behind.

• Ground sensor (Harr-Scan ground radar): on cavities, about 77% faster than the matched hyperbola filter with the same number of finds (1.54 ms vs 2.73 ms). On pipes and cables, C3 was about 3.5 times faster than Harr-Scan, so Harr-Scan was about 71% slower there, but it found more and had 8 times fewer false flags.

_____________________________________________________________________________________________

Sets is simply a 2 line system, where good data goes to one line and hard data to the second. An alternative, Multi-lines, allows for different types of data to different lines, text to one, graphics to another, and so forth. It can also subdivide deeper if desired, such as English and Spanish text.

Cascades is an escalation process born from Sets, data that does not pass easily gets set to another line where more effort can be given, and if needed it can be escalated deeper. The idea is that a dwindling percentage of the data is at lower levels so that the maximum speed can be given to the easiest data.

This has made some things happen that I just could not expect to have happen because it has been less than a week for most of the software above to be made. Sets was made for Data Compression initially, and it does good there, but it shines in certain applications and still is very effective in others.

I am very sure it can be used on a number of applications to bring better performance in one way or another. If the admin or mod team approves I will also include my Github in the comments for review of methods and code for scientific or peer review.

0 Upvotes

23 comments sorted by

1

u/Actual__Wizard 1d ago edited 1d ago

Cascades is an escalation process born from Sets, data that does not pass easily gets set to another line where more effort can be given, and if needed it can be escalated deeper. The idea is that a dwindling percentage of the data is at lower levels so that the maximum speed can be given to the easiest data.

You're describing regression, the technology you are describing has existed since the 1970s. There's obviously prior art for everything you're describing, so it's not patent able sorry.

If you're referring to structured data (normally the data is sorted, but it depends on the data itself, and the goal of the range), then it's been around since the 1970s as well. Granted, the implementations are rare because of the limitations of a system like that. Like, figuring out how to have tables to write new data to with out completely breaking the scheme.

I also want to be clear with you: I was attempting to discuss my "faster than theoretically possible" sort algo that goes hand and hand with this tech in this sub and would describe my experience as "a purely frustrating and angering waste of my time."

So, if there is any validity to what you are saying: There is no point in posting it here, these people are just going to use an LLM to incorrectly determine that you're a crackpot.

0

u/PHDEinstein007 1d ago

I hate this language you use.

It's like trying to copyright all sci-fi fantasy books because a book in that genre was written and copyrighted. Even among engines for cars, there is a lot of difference than "uses gasoline, has 6 cylinders" and a lot of patents go up for that.

Now, there are 3 Supreme Court Rulings saying "different results" of a significant magnitude are enforceable. In my case the speed is insane compared to the dusty things of the past.

I can have my LLM write up something for their LLM's of course, which is sort of funny but legit as can be for possibly convincing a few. In fact, here is a good go by Claude:

HARRINGTON'S SETS AND THE CASCADE: A TECHNICAL DESCRIPTION

Author of the method: Michael Hugh Harrington. Status: patent pending (US).

1. WHAT SETS IS

Sets is a lossless data-organizing method. It runs before the main processing (compression, filtering, packet inspection, model training) and changes the order and grouping of the work, not the processing tool itself.

Steps:

a) Split the input into small windows or records.

b) Classify each window by the kind of data it is (text, numeric, structured records, repeated content, high-entropy or noise-like content, and so on).

c) Group windows of the same kind into "Sets". A small tracker records where every window came from, so the original is rebuilt bit for bit.

d) Process each Set separately, in parallel, with a tool or setting suited to that kind of data.

e) Join the results. The tracker restores the original order exactly.

The core claim is narrow and testable: like data processed with like data, in parallel, gives better results (smaller output, faster runs, or both) than processing the mixed stream as one piece.

2. WHAT THE CASCADE IS

The cascade adds a second idea to Sets: material that does not respond on the first line is moved to another line instead of being dropped or stored raw.

- Line 1 handles the bulk: the easy, well-behaved material, cheaply and quickly.

- Whatever does not respond there is pushed down to line 2, where stronger, slower or more specialized tools work on a much smaller leftover portion.

- Anything still unresolved moves down again, for a fixed number of levels.

- The final remainder ("the dwindle") is labelled as unresolvable (for example true random data) and handled at minimum cost. It is reported, not hidden.

The leftover lines can be split across processor cores, so decoding stays fast. "Multi-line" runs several lines in parallel, each holding a queue of Sets. A "modulator" runs two methods on the same piece of data and keeps whichever result is better.

3. WHAT IT IS NOT

- It is not regression. Nothing is fitted to predict a dependent variable. Sets is a routing and grouping step: it decides which data goes where and in what order, and the tools downstream do their usual work.

- It is not lossy. Every result is checked by decoding and comparing byte for byte.

- It does not replace the tools it routes data to. The same open tools (zstd, bsc, Snort and others) run unchanged inside it.

4. KNOWN NEARBY METHODS (named openly so the comparison can be judged)

- Content-based splitting and per-block compressor choice (for example in archivers): these pick one method per block. Sets regroups windows from across the whole file by kind before processing, and the cascade re-routes failures through later lines.

- Cascade classifiers (for example Viola-Jones) reject easy cases early. Harrington's cascade does the opposite: it keeps the hard cases and works on them further with stronger tools, rather than discarding them.

- Mixture-of-experts and routing in neural networks: these route inside a learned model. Sets routes raw data before processing, using a small explicit tracker.

- Curriculum learning (ordering training data easy to hard): related in spirit where Sets is applied to AI training. The difference is the multi-line queues and the push-down of material that is not being learned.

Whether the combination is novel is a legal question for the patent office. The technical question is simply whether it measurably beats the standard tools on the same data, and that is testable.

5. MEASURED RESULTS (all lossless and verified by decode)

- Mixed binary test file: the cascade version came out 39-46% smaller than Sets without the cascade, with decode time staying small after line 2 was split across cores.

- True random data: it ties (stored at minimum cost), as it should. It claims nothing on random data.

- Some files got slightly worse (for example a mixed 3.2 GB tar, 0.14% larger). The current version compresses both ways and keeps the smaller.

- Public industrial sensor data (SKAB, NAB): 24-37% smaller than the best standard general-purpose compressor tested.

- Public truck J1939 CAN log: 58% smaller than brotli -11.

6. HOW TO EVALUATE IT FAIRLY

Judge it by the results. Run the standard tool alone and the same tool inside Sets or the cascade, on the same public data, and compare output size, speed and exact decode. Public data and the open tools are enough to check the claims.

1

u/Actual__Wizard 1d ago

In my case the speed is insane compared to the dusty things of the past.

And I assume that you're not even doing mega optimizations like read in place and using chunkmaps?

Real Example:

 #get a file by it's fileID
 def query_getfileid(query, cmf):
     queryval = int(query)
     if queryval <= 0:
         print("File ID Must be greater than 0")
         return (-1)
     data, files = cmf
     lastid = len(data) - 1
     if queryval > lastid:
         print("File ID Must be less than or equal to: " + str(lastid))
         return (-1)
     rowid = (int(query)) - 1
     row = data[rowid]
     fileid = row[4]
     file = files[fileid]
     pathtemp = file[1]
     pathtemp2 = pathtemp.replace("chunkmapsbyfile","chunks")
     path = pathtemp2.replace("chunkmap","chunkfile")
     start = int(row[1])
     end = (int(row[2]))-1

with open (path, mode="rb") as CF:
    CF.seek(start)
    bindata = CF.read(end-start)

textdata = bindata.decode('utf-8')
return (textdata)

1

u/PHDEinstein007 1d ago

• The last entry can never be fetched. It rejects any ID above len(data) - 1, but then subtracts 1 to find the row, so the last row can't be reached.

• It drops a byte. It subtracts 1 from the end position and then reads end - start bytes, which cuts the last byte off each chunk if the end position is meant to be inclusive.

• It crashes on binary data. It forces every chunk through decode('utf-8'), so any chunk that isn't valid text, such as compressed or binary data, raises an error.

• Bad input crashes it too. int(query) fails on anything that isn't a whole number, and other errors just print a message and return -1.

• The comment doesn't match the code. It says "get a file by its fileID", but it actually looks up a row number.

_______________

Hold on though, challenge accepted

1

u/PHDEinstein007 1d ago

and no, I am not doing that sort of stuff, but some code is coming. I am fetching it remotely (at work, the stuff is on my desktop, takes a moment)

1

u/Actual__Wizard 1d ago

I'm not sure exactly what you're doing, but if you know what clickhouse is (it's a database technology), I have a product coming out that is conceptually "click house for language." So, instead of it being a product focused on data analytics, it's a product that is focused on language data analytics. It utilizes a ridiculously fast sparse data sorting algo.

And I want to be clear with you: Only the product itself is patent able and you are going to get serious blowback from people.

They're going to use an LLM to evaluate what you are doing and that's not going to work.

What you described sounds like about 10,000 other products that exist...

1

u/PHDEinstein007 1d ago

This is a link on my private website to a text file of the code for my AI Filter sorting program.

The MHarr AI Sort filter code, the C++ version that ran about 85 times faster than datatrove, at about 3 seconds against 259 on the same text files.

1

u/PHDEinstein007 1d ago

that is a patent pending method, the code is copyright protected and is all rights reserved.

You can use this for test and comparison purposes, not for commercial use of any sort

1

u/Actual__Wizard 1d ago

Okay I see the decoding and the filters and what not, I also see judge_head and judge_rest.

0

u/PHDEinstein007 1d ago

The basic Sets behind this filtering system is what makes it so amazing. It's lightning fast and will be studied for sure by others. I made many efforts and I am not in those fields and yet I crushed them due to the speed advantage.

1

u/Actual__Wizard 1d ago

To be fair: After reading that description of a "cascade" I suppose it's not the same thing as regression as it appears to be "more complex." But, that's based upon "what you're saying and not me analyzing the product."

0

u/PHDEinstein007 22h ago

My AI said this:

On the Reddit guy: he's not full of it, but he's mostly reviewing the wrong thing, and one of his statements is flatly wrong.

What he gets right: pigeonhole and radix sorts really are about as fast as sorting gets when the keys are small numbers. Their speed is limited by memory. If you claim your Sets sort beats sorting algorithms, he's right that you'd need to race those.

Where he's wrong:

  • "Log means exponentially slower" is backwards. A log factor grows very slowly. Sorting work that grows with "n log n" is only a little worse than growing in a straight line, and nowhere near exponential. That's a basic mistake for someone lecturing on sort speed.
  • "Never tested against competition" is false for what he read. The code he read is MHarr AI Sort, the AI data filter. It isn't a sorting algorithm. It reads web pages, judges their quality, and removes near-copies. We raced it against datatrove [OPP] and NeMo Curator [OPP], which are the tools that do that job. Comparing it to pigeonhole sort is comparing a mail sorter to a conveyor belt.
  • "Too complex" misses the point. The checks it does on each page are the work it exists to do.

The bloom filter: our duplicate finder doesn't use one. It uses exact fingerprints, then groups pages that share most of their "anchor" pieces. A bloom filter is a memory-saving shortcut that can wrongly say "seen before" and drop a page that was unique. Suggesting one for huge, web-sized jobs is a fair idea, but it's a trade-off, not a fix for a flaw.

He's not hostile, either: his first edit says outright that he thinks your work is useful.

_____________________

Now my words, the process does something different, but the core is a sort of critical data types into more efficient piles and this is a key mechanism. My competition is NeMo Curator and datatrove, not bloom or anything that is strictly a sorter.

1

u/Actual__Wizard 21h ago

"Log means exponentially slower" is backwards. A log factor grows very slowly.

Your spam bot is incorrectly extrapolating information in a way that is inaccurate. As the length of the data to sort increases, the time it takes to complete the sort grows exponentially.

Please stop spamming me with a spam bot, I have enough work to do just communicating with human beings. I don't want to have my work load quadrupled because I have to fact check everything a spam bot produces.

Suggesting one for huge, web-sized jobs is a fair idea

Okay, well if that's not what you're doing in 2026, then I'm not sure what you're trying to accomplish in algo design. If we're talking about algo design, then that's clearly what the area of interest is.

1

u/PHDEinstein007 18h ago

run my code, run NeMo Curator and/or datatrove against it, and use information from a public source. Or use another program like them. Do not compare apples to a V6 engine, do not compare oranges to Asphalt. They are not the same.

Only when you run the "best" in the field against mine will you finally realize you have continuously barked up the wrong tree.

1

u/Actual__Wizard 18h ago edited 18h ago

I understand what you're saying and I had all of the concerns before as well. The problem is, sorting isn't a procedure that is limited exclusively by software, it's also limited by hardware. So, the idea that your software only solution is going to compare to industrial scale cloud sorting systems is just simply not accurate.

If it has a commercial use, then please pursue that, but the idea that it's novel because of the performance is inaccurate. The reality is more than likely: Compared to the solutions that were previously accepted as the record holders, it's not a fast sorting system at all.

And yeah: I don't feel right about that, but that's the way it is.

The record was set by Tencent in 2016 and as far as I know, they still have it.

Not to be rude: But what you presented is going to be obliterated by the record holder. That system is wicked turbo fast compared to the code only solution that you presented.

So, your code, speeds a specific process up, not a general one, and saves money, so it's a commercial product.

I already went through this and that's the way it is. If you built that into a standalone product, then it's certainly IP that can be protected by patents. But, what you presented, does not appear to be patent-able. That appears to be an integration or plugin to an existing product. As far as I know, your patent can't be contingent on other systems existing... I wish I was able to explain it better than I am capable of.

1

u/PHDEinstein007 16h ago

You're comparing two different jobs. The Tencent record you mean is the Sort Benchmark, where a cluster of hundreds of servers sorts about 100 terabytes of fixed-size records by a short key. That's a raw sorting contest, and I never entered it. MHarr AI Sort isn't a record sorter. It's a data filter for AI training: it reads raw web pages, judges their quality, removes boilerplate and near-duplicates, and decides what's fit to train a model on. Measuring it against GraySort is like timing a mail-sorting room against a freight train and declaring the mail room slow. The sort inside it is one mechanism in a pipeline, not the product.

The hardware point cuts against you. I didn't compare my code to a cloud cluster. I compared it to the tool the industry actually uses for this exact job, Hugging Face's datatrove running the FineWeb filtering recipe, on the same machine, the same core and the same 29,329 Common Crawl pages. Mine finished in about 3 seconds, theirs in about 259. When both run on identical hardware, hardware stops being the excuse. If you think the comparison is unfair, the code is public. Run both yourself and post your numbers.

On novelty, you have it backwards. The novelty is in the method, how the data gets grouped and cascaded before the expensive work runs. The speed is the evidence that the method works, not the claim itself. And an improvement doesn't have to be a standalone product to be patentable. US law covers any new and useful process or any new and useful improvement to one, and most software patents in force are exactly that: improvements to how existing systems do their job.

So yes, it speeds up a specific, very expensive process that every company training AI models pays for. That's not a weakness. That's the market.

1

u/Actual__Wizard 15h ago edited 15h ago

Note: This is out of order...

The hardware point cuts against you.

Look, you don't understand what is going on here: I am trying my best to help you out with out pointing out what to do. Okay...

So, I'm telling you right now what the arguments against what you are doing right now are...

Be serious: What problem did you solve?

You solved a cost problem, not a novelty problem. There isn't a gap in the market that your product fills, rather it reduces the cost to utilize existing products.

You're comparing two different jobs.

No, you're not understanding, I'm trying to explain the arguments against what you're saying, because I've heard them all before.

And an improvement doesn't have to be a standalone product to be patentable.

Okay, but, wouldn't a standalone product that integrates into other products be a more lucrative business asset compared to doing it the other way? I'm just asking you the question. I don't know the market for those products well enough.

And I personally am confident that a standalone product that accomplishes cost reduction would be the kind of IP that somebody would want to protect, and I can't imagine a single reason why it wouldn't be patentable, or worth pursuing a patent for.

Plus, if it did work that way, then there would be a very clear diagram depicting it connecting to other applications to integrate with them.

So, if there was a business, where a company did integrations of that software for clients, the IP of the business would be protected. A competitor could not do the same thing, unless they had their own IP...

Then, if an entity, has both the means, and the IP, to me, that represents value, and value is equity. I have absolutely no idea regarding the value at all whatever so ever, but it wouldn't be zero if it saves companies money while operating systems that they're going to operate either way.

Edit: Well that went really poorly. I don't think they understand that the value in that is "between him and his customers." That's not a bad thing... What they are demonstrating is not truly novel or patentable in it's current form. That's not "what novelty is." It doesn't do anything new, it rather operates in a way that is different... And because it's not a standalone product, then it doesn't do anything by itself. So, that would be like patenting a part that goes on somebody else's product. That's not worth pursuing, what does that do?

0

u/PHDEinstein007 15h ago

I give up on you, if you seemed to have stared to learn then asked me to modify something to show exactly what I could do, that would be one thing, but instead you keep going on. You are the very example of Sunk Cost Fallacy, you want to be proven correct but instead are always wrong.

I'm just blocking you, I see no other recourse

-1

u/PHDEinstein007 1d ago

Thats fair, admitting when you were incorrect is a good debating skill and makes the other side feel acknowledged on their points.

0

u/Actual__Wizard 23h ago edited 23h ago

Sir, I was just here to inform you that it my opinion that is not patent-able and doing so would be a waste of your time because the patent office will reject it.

And after seeing the source code, I am 100% confident that it's not faster than current techniques.

Maybe in your specific case, your algo operates faster than the other options that are available to you at this time, but I am confident that in all cases, an algo that is even faster already exists today, it is just not implemented into the product you are working with.

As a person who's sparse data router beats a pigeon hole sort by like 20% in narrow ranges, specifically when sparse data is being used, and was basically told "You don't get any scientific credit for that by multiple PHDs."

Good luck to your sir. I'm warning you, there's a million sorting algos already. There's so many that most PHDs won't even look at what you're doing and they will just blindly assume that your claims of notability are not accurate. Then they're going to use an LLM to hallucinate that it's the same thing as something else. Then the PHD will read the lies the LLM produced and then lecture you with the lies... Which, at that point in time, you will find out why the sub r/idiocracy exists. You're an expert talking to clueless people, who are reading word for word the output of spam bot to you and they will think that you're the unintelligent one.

My advice to you is to build that out into a commercial product and keep the source code closed.

Until you have actual customers I don't think pursuing a patent is economically intelligent and in that area it's going to be a battle.

PS: I didn't downvote you.

0

u/PHDEinstein007 23h ago

I have patented methods in the past, and they were defensible until they lapsed (one is still in effect until April, if funded the weakest of my 5 patents previously issued would be sustained).

And you never even tested it against competition. Not even once, or you would have seen how fast it is compared to the competition.

1

u/Actual__Wizard 23h ago edited 22h ago

And you never even tested it against competition. Not even once, or you would have seen how fast it is compared to the competition.

Yeah that's because I've worked with pigeon hole sorts and I don't think you understand how fast those are.

Those algos will absolutely sort 1b rows/sec on my machine. It's something like 100m rows/sec/core... It's limiting factor is basically the read and write speed of the memory. Simply put: Based upon the source code you showed me, the operation of that is way too complex.

It has to do the sort basically with out "doing anything that consumes CPU cycles" and we've been working that down on a per cycle basis for 50+ years.

Edit: So, it's not that I don't think that what you are doing is useful, because it seems useful to me, I just don't think your improvements are "noteworthy in the area of sorting algos."

Edit2: Most sorting algos have a "speed" that they're are denoted with that represents how much time one can expect for the algo to complete. Most sorting algos have a "log" in that description, which if you know what log is, then you know that the more data there is, the slower the algo is "exponentially." True pigeon hole sorts do not have that problem and are O(n + R)... So, your algo is probably going "many times slower than the competition and you don't know that because you're making a bad comparison." Those algos are "near memory copying speed" and other algos like Timsort, that are many times slower, are typically used because of their flexibility and the lack of need to sort gigabytes of data per second.