Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PERL counting words that are missing a vowel

Name: Anonymous 2011-06-04 16:02

Write a program called no_vowels.pl that will count
how many words DO NOT have an 'a' or an 'A',
how many DO NOT have an 'e' or an 'E',
how many DO NOT have an 'i' or an
'I', and so on.

The output should look like the below. 
Note that the letters must be listed in decreasing order of frequency

14000 words do not have an 'u'
11258 words do not have an 'o'
10123 words do not have an 'i'
11523 words do not have an 'a'
10111 words do not have an 'e'

Name: Anonymous 2011-06-10 20:42

>Someone please optimize this, I suck at programming.

Yeah, don't use C++ io streams, they are slow as fuck!, there's like several virtual calls per fucking character read from a file plus 2 or 3 fucking buffers things get copied into. The solution is either to use C style fopen/fread/etc. which is better, but the optimal solution is to use your operating system's file IO facilities, like the POSIX open/read/write calls or Windows OpenFile, ReadFile, etc. and just wrap it in a thin C++ class with no virtual functions.

Also, boost's threads implementation is slow and unoptimized because boost programmers are lazy as fuck like you. Use a C++0x/C++11 threads implementation, which has the same interfaces, but is more optimized.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List