```python
def amicable_numbers_sum(limit):
    """
    Calculates the sum of all amicable numbers below a given limit.

    An amicable pair (a, b) consists of two different numbers where the sum
    of the proper divisors of a is equal to b, and the sum of the proper
    divisors of b is equal to a.
    """
    if limit <= 1:
        return 0

    # Step 1: Pre-calculate the sum of proper divisors for each number up to the limit.
    # divisor_sums[n] will store the sum of proper divisors of n.
    # We use a sieve-like method for efficiency.
    divisor_sums = [0] * limit
    for i in range(1, limit // 2 + 1):
        for multiple in range(i * 2, limit, i):
            divisor_sums[multiple] += i

    # Step 2: Iterate through numbers to find and sum amicable numbers.
    total_sum = 0
    for number in range(1, limit):
        partner = divisor_sums[number]

        # Check for the amicable pair conditions:
        # 1. The partner must be within the pre-calculated range.
        # 2. The numbers must be different (a != b).
        # 3. The sum of the partner's divisors must equal the original number (d(b) = a).
        if partner < limit and partner != number and divisor_sums[partner] == number:
            total_sum += number
            
    return total_sum
```