Jamie Gaskins

Results 87 issues of Jamie Gaskins

This PR optimizes the number of heap allocations performed in each request. For example, `Array(UInt8).new(0)` allocates an array on the heap whereas `Bytes.empty` involves no heap allocations — the `Slice`...

My AWS client (hand-rolled because I need a few different services) uses a connection pool to avoid opening a new connection on every request, so it uses the `Connection: keep-alive`...

Using `Indexable#bsearch` operates in logarithmic time, but `Hash#[]?` operates in constant time. Benchmark code ```crystal require "set" COMMON_HEADERS = %w( Accept-Encoding Accept-Language Accept-encoding Accept-language Allow Cache-Control Cache-control Connection Content-Disposition Content-Encoding...

performance
kind:refactor
topic:stdlib:networking

Preallocating the correct-size hash is faster for hash sizes > 4, but the empty hash is faster for sizes K2) : Hash(K2, V) forall K2 hash = Hash(K2, V).new(initial_capacity: size)...

performance
kind:refactor
topic:stdlib:collection

Combined with #14487, it would be useful to have `Range` methods that, when given another range, would return a new range that contains the union or intersection of both ranges....

kind:feature
topic:stdlib:collection

The `Range` type doesn't currently tell you if it overlaps with another instance, but it's a useful thing to check for. For example, a scheduling app may need to detect...

kind:feature
topic:stdlib:collection

All the major SQL and a few NoSQL databases support `JOIN` queries. Currently, there is nothing in here to support them. Everything is queried like we're doing an ActiveRecord `includes`...

Looking at the query serialization for both the MongoDB and Postgres adapters, there is a _lot_ of similarity (the `QueryAttribute` classes are nearly identical) and I think a lot of...

This code: ``` ruby require 'perpetuity/postgres' Perpetuity.data_source 'postgres://localhost/perpetuity_gem_test' class Foo def initialize @bar = Bar.new(self) end end class Bar def initialize foo @foo = foo end end Perpetuity.generate_mapper_for Foo do...

If a user has a mailbox which has thousands of messages in it, loading all of them is a huge waste when they are likely to only view the latest...