Skip to content

Unexpected performance improvements #43

@rcwsr

Description

@rcwsr

Hi, I couldn't see a discussions tab so raised as an issue. Firstly thank you for this package it is a lifesaver!

I have a large suite of 6858 phpunit integration tests. I am running the suite twice in CI jobs, one job with the mcrypt extension and the other job with this polyfill. The suite passes fine in both cases but I am seeing an unexpected performance increase for the suite with polyfill. Both jobs are run using PHP 8.1.

  1. with mcrypt compat polyfill: Time: 06:45.218, Memory: 1.22 GB
  2. with mcrypt extension: Time: 10:47.279, Memory: 2.78 GB
  3. a colleague's branch that uses extension (control): Time: 11:15.692, Memory: 2.74 GB

Could this be due to better garbage collection with the pure PHP implementation vs the very old c extension?

For completeness but I don't think it's relevant, I have a decorator class that wraps the mcrypt_ functions that I use, calling the phpseclib_ function directly according to an environment variable.

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