Skip to content

Commit 93bde32

Browse files
committed
Improve performance (toImmutable() method).
1 parent d201f7f commit 93bde32

34 files changed

+183
-118
lines changed

bench/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
vendor/
3+
package-lock.php.yml

bench/package.php.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: bench
2+
version: 1.0.0
3+
4+
plugins: [App]
5+
6+
deps:
7+
jphp-core: '*'
8+
jphp-zend-ext: '*'
9+
jphp-json-ext: '*'
10+
11+
app:
12+
encoding: UTF-8
13+
14+
sources:
15+
- src
16+
17+
includes:
18+
- 'bench.php'

bench/src/benchmarks/NewObjectBenchmark.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function run()
3333
{
3434
for ($i = 0; $i < self::DEFAULT_ITERATIONS; $i++) {
3535
$o1 = new stdClass();
36+
3637
$o2 = new NewObjectBenchmark_A();
3738
$o3 = new NewObjectBenchmark_B();
3839
$o4 = new NewObjectBenchmark_C();

jphp-core/api-docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
---
44

55
## jphp-core
6-
> version 1.1.1, created by JPPM.
6+
> version 1.1.2, created by JPPM.
77
88
Compiler and Launcher for JPHP.
99

1010
### Install
1111
```
12-
12+
1313
```
1414

1515
### API

jphp-core/api-docs/README.ru.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
---
44

55
## jphp-core
6-
> версия 1.1.1, создано с помощью JPPM.
6+
> версия 1.1.2, создано с помощью JPPM.
77
88
Compiler and Launcher for JPHP.
99

1010
### Установка
1111
```
12-
12+
1313
```
1414

1515
### АПИ

jphp-core/package.php.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
name: jphp-core
3-
version: 1.1.1
3+
version: 1.1.2
44
description: Compiler and Launcher for JPHP.
55

66
deps:
7-
jphp-runtime: '~1.1.0'
7+
jphp-runtime: '~1.1.3'
88

99

1010
plugins: [Doc, Hub]

jphp-core/src/org/develnext/jphp/core/compiler/jvm/statement/ExpressionStmtCompiler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2138,7 +2138,9 @@ public void writeSysStaticCall(Class clazz, String method, Class returnClazz, Cl
21382138

21392139
public void writePopImmutable() {
21402140
if (!stackPeek().immutable) {
2141-
writeSysDynamicCall(Memory.class, "toImmutable", Memory.class);
2141+
writeSysStaticCall(Memory.class, "__static_fast_toImmutable", Memory.class, Memory.class);
2142+
2143+
//writeSysDynamicCall(Memory.class, "fast_toImmutable", Memory.class);
21422144
setStackPeekAsImmutable();
21432145
}
21442146
}

jphp-runtime/api-docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
---
44

55
## jphp-runtime
6-
> version 1.1.1, created by JPPM.
6+
> version 1.1.3, created by JPPM.
77
88
Runtime for JPHP + Standard library.
99

1010
### Install
1111
```
12-
12+
1313
```
1414

1515
### API

jphp-runtime/api-docs/README.ru.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
---
44

55
## jphp-runtime
6-
> версия 1.1.1, создано с помощью JPPM.
6+
> версия 1.1.3, создано с помощью JPPM.
77
88
Runtime for JPHP + Standard library.
99

1010
### Установка
1111
```
12-
12+
1313
```
1414

1515
### АПИ

jphp-runtime/package.php.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
name: jphp-runtime
3-
version: 1.1.2
3+
version: 1.1.3
44
description: Runtime for JPHP + Standard library.
55

66
plugins: [Doc, Hub]
@@ -14,6 +14,8 @@ config:
1414
ignore: ['/package.hub.yml']
1515

1616
history:
17+
1.1.2:
18+
- Improve call stack performance.
1719
1.1.1:
1820
- Improve arrays performance.
1921
1.1.0:

0 commit comments

Comments
 (0)