Skip to content

Conversation

@nielsdos
Copy link
Member

@nielsdos nielsdos commented May 1, 2024

Since freeing can deal with NULL, we can avoid calling bc_init_num and avoid resetting the number during parsing.

Using benchmark from #14076.

Before:

1.544440984726
2.0288550853729
2.092139005661

After:

1.5324399471283
1.9081380367279
2.065819978714

Since freeing can deal with NULL, we can avoid calling bc_init_num and
avoid resetting the number during parsing.

Using benchmark from php#14076.

Before:
```
1.544440984726
2.0288550853729
2.092139005661
```

After:
```
1.5324399471283
1.9081380367279
2.065819978714
```
@SakiTakamachi
Copy link
Member

Since result is mostly released during processing, a similar approach might be possible.

However, since the number of files to be changed is large, I think it would be better to make a separate PR.

@nielsdos
Copy link
Member Author

nielsdos commented May 1, 2024

Since result is mostly released during processing, a similar approach might be possible.

However, since the number of files to be changed is large, I think it would be better to make a separate PR.

Right, that would be a bit harder too.

@nielsdos nielsdos merged commit a66439a into php:master May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants