Skip to content

Commit

Permalink
更新 discord邀请链接
Browse files Browse the repository at this point in the history
  • Loading branch information
walon committed Jul 1, 2023
1 parent 8194526 commit 4546dbf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/basic/aotgeneric.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ LoadMetadataForAOTAssembly函数可以在任何时机调用,另外既可以在
所以对于常用尤其是性能敏感的泛型类和函数,可以提前在AOT中实例化。我们提供了工具帮助自动扫描收集相应的泛型实例,你运行菜单命令`HybridCLR/Generate/AOTGenericReference`即可。

:::tip
该命令只收集了热更新中用到的AOT泛型实例,并且生成的全部是注释形式的葮,需要你自己参考这个文件,根据实际需求在其他地方显式地实例化部分泛型。
该命令只收集了热更新中用到的AOT泛型实例,并且生成的全部是注释形式的代码,需要你自己参考这个文件,根据实际需求在其他地方显式地实例化部分泛型。
:::
### 获得补充元数据dll

Expand Down Expand Up @@ -256,10 +256,10 @@ HybridCLR支持`full genric sharing`后,不再需要补充元数据,简化

自2021.3.x LTS版本起,il2cpp已经完全支持`完全泛型共享(full generic sharing)`技术,当 Build Settings中 `Il2Cpp Code Generation` 选项为 `faster runtime` 时为之前章节介绍的泛型共享机制,为 `faster(smaller) build` 时开启
`full generic sharing` 机制。`full generic sharing`技术可以克服传统的il2cpp的值类型泛型无法共享的缺陷,泛型函数的所有泛型实例(无论泛型参数是值类型还是class类型)完全共享一份代码。
自2022.3.x LTS版本起,即使Build Settings中使用`faster runtime`选项也会开启`full generic sharing`机制,使用`faster(smaller) build`选项则迫使同个函数的所有泛型共享都使用一份代码。

自2022.3.x版本起,即使Build Settings中使用`faster runtime`选项也会开启`full generic sharing`机制,使用`faster(smaller) build`选项则迫使同个函数的所有泛型共享都使用一份代码。

`faster(smaller) build`选项的优点是可以任意泛型实例化,而且可以节约代码大小,缺点是极大地伤害了泛型函数的性能。完全泛型共享的代码相比于标准泛型共享代码有时候会慢几倍到十几倍,甚至比不上纯解释版本。因此强烈推荐**不要开启** `faster(smaller) build` 选项。对于2021版本想使用完全泛型共享则只能开启这个选项,而2022版本则可以使用`faster runtime`兼顾普通泛型共享和完全泛型共享,让性能最大化。
`faster(smaller) build`选项的优点是可以任意泛型实例化,而且可以节约代码大小,缺点是极大地伤害了泛型函数的性能。完全泛型共享的代码相比于标准泛型共享代码有时候会慢几倍到十几倍,甚至比不上纯解释版本。因此除了WebGL以外的平台建议
**不要开启** `faster(smaller) build` 选项。对于2021版本想使用完全泛型共享则只能开启这个选项,而2022版本则可以使用`faster runtime`兼顾普通泛型共享和完全泛型共享,让性能最大化。

## 附录:AOT泛型的共享泛型实例化示例

Expand Down
2 changes: 1 addition & 1 deletion docs/beginner/otherhelp.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- 新手1群:428404198(满)
- 新手2群:**680274677(推荐)**
- QQ悬赏互助群:762953653。悬赏提问,快速解决问题。
- discord频道 [https://discord.gg/eSXTZ3TH](https://discord.gg/eSXTZ3TH)
- discord频道 [https://discord.gg/BATfNfJnm2](https://discord.gg/BATfNfJnm2)
- 官方邮箱:hybridclr@code-philosophy.com
- 商业合作邮箱: business@code-philosophy.com

Expand Down
2 changes: 1 addition & 1 deletion docs/other/contactme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
- 新手1群:428404198(满)
- 新手2群:**680274677(推荐)**
- QQ悬赏互助群:762953653。悬赏提问,快速解决问题。
- discord频道 [https://discord.gg/eSXTZ3TH](https://discord.gg/eSXTZ3TH)
- discord频道 [https://discord.gg/BATfNfJnm2](https://discord.gg/BATfNfJnm2)
- 商业合作邮箱: business@code-philosophy.com
- [商业化支持](/other/business.md)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Support and contact
- discord [https://discord.gg/eSXTZ3TH](https://discord.gg/eSXTZ3TH)
- discord [https://discord.gg/BATfNfJnm2](https://discord.gg/BATfNfJnm2)
- Official QQ group 1: 651188171 (full)
- Novice QQ group 1: 428404198 (full)
- Novice QQ group 2: **680274677 (recommended)**
Expand Down

0 comments on commit 4546dbf

Please sign in to comment.