areduce speed improvements

Description

Two performance improvements for areduce:

1. Call alength once, rather than every iteration
2. Use unchecked-inc-int instead of inc since array indices are limited to int range

Example:

Criterium quick-bench:

  • 1.7.0-RC2: 15.5 ms

  • RC2+patch: 7.7 ms

Patch: clj-1765-2.patch
Screened by: Alex Miller

Environment

OSX 10.8.5, Oracle JDK1.8.0_25-b17

Status

Assignee

Unassigned

Reporter

Karsten Schmidt

Labels

Approval

Ok

Patch

Code

Fix versions

Affects versions

Priority

Major
Configure