I found out that `OPENSSL_cleanse` wastes a lot of time in my [project](https://brute.tk). For example, if it runs for 25 seconds, *3 seconds* are wasted by `OPENSSL_cleanse`. I checked the code of this function and decided that it isn't doing anything very useful for me. I know it [fills memory with garbage data](https://stackoverflow.com/a/26433959/4354477) for security reasons but I don't really care about it. So I decided to place `return;` just before the start of any operations in this function.

```
void OPENSSL_cleanse(void *ptr, size_t len)
{
    return;
    // original OpenSSL code goes here
}

```

I'm using Mac OS and Xcode. I've compiled the lib and installed it in `/Users/ForceBru/Desktop/openssl` via the `--openssldir` option of the `Configure` script. I've added it to my project in `Build Settings->Link Binary With Libraries` and added include dirs in `Build Settings->Search Paths->Header Search Paths` and `Build Settings->Search Paths->Library Search Paths`.

The project compiled fine, but the time profiler still shows pretty expensive calls to `OPENSSL_cleanse`.

**Edit:** the `C` tag is because OpenSSL is written in C, and the `C++` tag is because my code is in C++. Maybe this information will be helpful.

The question is, what am I doing wrong? How do I remove the calls to `OPENSSL_cleanse`? I think this has to do with linking, because the command line includes `-lcrypto`, which means this library can actually be taken from anywhere (right?), not necessarily from `/Users/ForceBru/Desktop/openssl`.

**Edit #2:** I've edited the linker options to use the `.a` file in `/Users/ForceBru/Desktop/openssl` and removed it from `Build Settings->Link Binary With Libraries`. Still no effect.