<commit_before>CPSC411 – Assignment 2
======================

[quote]
____
Write an Objective-C or C program that assists you in answering the following
question.

Given the file `CS411SampleCode/sample_data/words.zip` in the course GitHub
repository, find all the anagrams. What are the words that form the largest set
of anagrams given the words in the file? How long does your program take to
calculate the answer in seconds? What kind of CPU are you using?

(If your program takes longer than 5 seconds, then please rewrite your
program.)

Instructions will be posted towards the due date regarding how to submit your
answer.

If your answer is correct and the code executes correctly, you will receive
full credit. If your answer is incorrect you will receive no credit. If your
code does not execute correctly or if nothing is submitted you will receive no
credit.

There are 100 points possible.
____

Different versions
------------------
For fun I created a couple of different versions in different languages.

----
time ./go/anagram ./words
        0.39 real         0.36 user         0.03 sys

time php ./php/anagram.php ./words
        1.22 real         1.16 user         0.05 sys

time node ./node/anagrams.js ./words
        1.79 real         1.68 user         0.09 sys
----

License
-------
BSD, check the LICENSE file.<commit_msg>Add objective-c results, warning about benchmarks<commit_after>CPSC411 – Assignment 2
======================

[quote]
____
Write an Objective-C or C program that assists you in answering the following
question.

Given the file `CS411SampleCode/sample_data/words.zip` in the course GitHub
repository, find all the anagrams. What are the words that form the largest set
of anagrams given the words in the file? How long does your program take to
calculate the answer in seconds? What kind of CPU are you using?

(If your program takes longer than 5 seconds, then please rewrite your
program.)

Instructions will be posted towards the due date regarding how to submit your
answer.

If your answer is correct and the code executes correctly, you will receive
full credit. If your answer is incorrect you will receive no credit. If your
code does not execute correctly or if nothing is submitted you will receive no
credit.

There are 100 points possible.
____

Different versions
------------------
For fun I created a couple of different versions in different languages.

----
time ./go/anagram ./words
        0.39 real         0.36 user         0.03 sys

time php ./php/anagram.php ./words
        1.22 real         1.16 user         0.05 sys

time node ./node/anagrams.js ./words
        1.79 real         1.68 user         0.09 sys

time ./objc/artifacts/anagrams/Build/Products/Release/anagrams ./words
        1.11 real         1.05 user         0.05 sys
----

Remember, these benchmarks literally don't mean a thing and you shouldn't even
think about making decisions based on them. The author is unfamiliar with
idiomatic Objective-C or Node, so those versions are likely not as performant
as they should be.

License
-------
BSD, check the LICENSE file.
{'fraction_non_alphanumeric': 0.07920154539600772, 'fraction_numerical': 0.027366387636831937, 'mean_word_length': 2.8644278606965172, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4644392', 'n_tokens_mistral': 858, 'n_tokens_neox': 785, 'n_words': 435}