Skip to content

Convert BCrypt.java to a full JRuby extension #295

@headius

Description

@headius

The current implementation of BCrypt.java is written as a "normal" Java library that is then integrated into JRuby using our Java Integration subsystem.

While this is a simple way to implement the library and call it, it introduces a lot of overhead due to the nature of this cross-language boundary:

  • Ruby objects must be converted into appropriate types for the Java methods.
  • Java results must be converted back into Ruby objects.
  • Some amount of reflection overhead (perhaps eliminated by JRuby's JIT).

I believe the library could be much more efficient if moved to using JRuby's extension API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions