Uses 1059K of libraries. Click here for Pure Java version (7494L/39K).
1 | !7 |
2 | |
3 | concept A { S x; }
|
4 | concept B { S y; }
|
5 | |
6 | static int i = 100000, j = 100005; |
7 | |
8 | cmodule2 > DynTestModule {
|
9 | void test {
|
10 | repeat i { new A; }
|
11 | repeat j { new B; }
|
12 | |
13 | // speed up counting |
14 | print("indexing"); indexConceptField(A, 'x);
|
15 | print("indexing"); indexConceptFieldCI(B, 'y);
|
16 | |
17 | time "check" {
|
18 | repeat 100 { print("counting"); assertEqualsVerbose(i, countConcepts(A)); }
|
19 | repeat 100 { assertEqualsVerbose(j, countConcepts(B)); }
|
20 | } |
21 | } |
22 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1024022 |
| Snippet name: | Test countConcepts optimization (OK) |
| Eternal ID of this version: | #1024022/17 |
| Text MD5: | 4503be7f035700fab09cf33563d72ef8 |
| Transpilation MD5: | c2c74453eb4e20389c3ebb0e1f11e0c6 |
| Author: | stefan |
| Category: | javax / concepts |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-05-03 22:08:42 |
| Source code size: | 501 bytes / 22 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 758 / 1117 |
| Version history: | 16 change(s) |
| Referenced in: | [show references] |