Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tokisakikurumi2001/frequency_of_char_in_string

Calculate the frequency of characters in string
https://github.com/tokisakikurumi2001/frequency_of_char_in_string

c csharp haskell java javascript objective-c perl6 php python ruby swift4 vuejs

Last synced: about 2 months ago
JSON representation

Calculate the frequency of characters in string

Awesome Lists containing this project

README

        

# Frequency of char in string

## How this work?
Calculate the number of repetion of character in the given string

## Highlights for this project

- Written in 11 programming languages for benchmarking purpose
- Here is the demo page to show how the code works. [Demo]

## Benchmark

All the string for benchmarking is "Hello Programming World"
However, in the repository, I keep the string like "Hello C World"(frequency_of_char_in_string.c) or "Hello Haskell World"(frequency_of_char_in_string.hs)

- The benchmark was taken on Windows 7, 64-bit
- With 1 exception for Objective-C compiler, I have to use the paiza.io
- And 1 exception for C#, I use the codingground

| Programming language | Time |
|:----------------------:|:--------:|
| C | 0.016s |
| Haskell | 0.016s |
| Perl | 0.016s |
| C# | 0.021s |
| Objective-C | 0.040s |
| Swift | 0.047s |
| Python | 0.078s |
| Ruby | 0.078s |
| Java | 0.128s |
| NodeJS | 0.203s |
| PHP | 1.186s |

[//]: #
[Demo]: