-
With the constant `::Foo::Bar::Spam` we look for these files on all load paths:
1. `foo/bar/spam.rb`
2. `foo/bar.rb`
3. `foo.rb`
The first of those to exist is the file that defines the consta…
-
It often not entirely clear WHY `freeze` is being used. So here is some most common reasons a developer might freeze variables.
### Creating immutable constants
In Ruby, constants are mutable. It's …
-
```
127.0.0.1 - - [10/Sep/2015:03:51:43 +0000] "GET /stylesheets/bootflat.min.css HTTP/1.1" 200 53197 "-" "ISUCON4 Benchmarker" "127.1.0.40"
127.0.0.1 - - [10/Sep/2015:03:51:43 +0000] "GET /stylesheet…
-
Howdy.
I was looking for a Rubiesque implementation of NanoID and first found this. Looking at the code, I wondered if SecureRandom might have a better implementation.
Come to find out SecureRan…
-
Hello,
~~I see when running the following code that input `"single` with case `"head_match"` will consume all my RAM, all my swap, and will get OOM killed.~~
~~Same case with input `"large"` is…
-
We had initially used Indexable in a lot of places (e.g, MultiIndexable#unsafe_fetch_element takes Indexable as a coord) in order to allow future flexibility. However I think that this puts unneccessa…
-
`start_with?` and `end_with?` accept multiple arguments, so something like `start_with?(/foo|bar/)` can be replaced by `start_with?("foo, "bar")`. Simple benchmarking shows this to be ~1.75x-2.25x as …
-
-
Reworking the README I came upon an interesting performance difference. So let's do our standard example first:
```elixir
list = Enum.to_list(1..10_000)
map_fun = fn i -> [i, i * i] end
Benc…
-
This task is to find a systematic way to figure out the cases for which a library in the [automated benchmarking system](https://github.com/mlpack/benchmarks) performs badly
* very slow (ranked las…