Skip to content
/ palindrome Public

Palindrome checker in C with UTF-8 support (~50 million words sorted per second)

License

Notifications You must be signed in to change notification settings

644/palindrome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description

C program to return a list of palindromes in file: it's only 56 lines of ASM and the UTF-8 version is only 138 lines of ASM!

It can sort through a list of 300 million words case insensitively and write them to a file in under 7s. The UTF-8 version is ~1s slower for every 300 million words.

Install & Usage

# UTF-8 version
wget https://github.com/i34/palindrome/raw/master/palindrome-utf8.c
gcc -O3 -opalindrome-utf8 palindrome-utf8.c
./palindrome-utf8 /path/to/wordfile

# Non UTF-8 version
wget https://github.com/i34/palindrome/raw/master/palindrome.c
gcc -O3 -opalindrome palindrome.c
./palindrome /path/to/wordfile

About

Palindrome checker in C with UTF-8 support (~50 million words sorted per second)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages