1
+ function text1 ( ) {
2
+ const str1 = "this1 is a lorem ipsum string" ;
3
+ const str2 = "this1 is not a lorem ipsum string" ;
4
+ const str3 = "this1 is not a lorem ipsum string2" ;
5
+ const str4 = "this1 is not a lorem ipsum string4" ;
6
+ const str5 = "this1 is not a lorem ipsum string5" ;
7
+ const str6 = "this1 is not a lorem ipsum string6" ;
8
+ return str1 + str2 + str3 + str4 + str5 + str6 ;
9
+ }
10
+
11
+ function text2 ( ) {
12
+ const str1 = "this2 is a lorem ipsum string" ;
13
+ const str2 = "this2 is not a lorem ipsum string" ;
14
+ const str3 = "this2 is not a lorem ipsum string2" ;
15
+ const str4 = "this2 is not a lorem ipsum string4" ;
16
+ const str5 = "this2 is not a lorem ipsum string5" ;
17
+ const str6 = "this2 is not a lorem ipsum string6" ;
18
+ return str1 + str2 + str3 + str4 + str5 + str6 ;
19
+ }
20
+
21
+ function text3 ( ) {
22
+ const str1 = "this3 is a lorem ipsum string" ;
23
+ const str2 = "this3 is not a lorem ipsum string" ;
24
+ const str3 = "this3 is not a lorem ipsum string2" ;
25
+ const str4 = "this3 is not a lorem ipsum string4" ;
26
+ const str5 = "this3 is not a lorem ipsum string5" ;
27
+ const str6 = "this3 is not a lorem ipsum string6" ;
28
+ return str1 + str2 + str3 + str4 + str5 + str6 ;
29
+ }
30
+
31
+ function text4 ( ) {
32
+ const str1 = "this4 is a lorem ipsum string" ;
33
+ const str2 = "this4 is not a lorem ipsum string" ;
34
+ const str3 = "this4 is not a lorem ipsum string2" ;
35
+ const str4 = "this4 is not a lorem ipsum string4" ;
36
+ const str5 = "this4 is not a lorem ipsum string5" ;
37
+ const str6 = "this4 is not a lorem ipsum string6" ;
38
+ return str1 + str2 + str3 + str4 + str5 + str6 ;
39
+ }
40
+
41
+ function text5 ( ) {
42
+ const str1 = "this5 is a lorem ipsum string" ;
43
+ const str2 = "this5 is not a lorem ipsum string" ;
44
+ const str3 = "this5 is not a lorem ipsum string2" ;
45
+ const str4 = "this5 is not a lorem ipsum string4" ;
46
+ const str5 = "this5 is not a lorem ipsum string5" ;
47
+ const str6 = "this5 is not a lorem ipsum string6" ;
48
+ return str1 + str2 + str3 + str4 + str5 + str6 ;
49
+ }
50
+
51
+ function text6 ( ) {
52
+ const str1 = "this6 is a lorem ipsum string" ;
53
+ const str2 = "this6 is not a lorem ipsum string" ;
54
+ const str3 = "this6 is not a lorem ipsum string2" ;
55
+ const str4 = "this6 is not a lorem ipsum string4" ;
56
+ const str5 = "this6 is not a lorem ipsum string5" ;
57
+ const str6 = "this6 is not a lorem ipsum string6" ;
58
+ return str1 + str2 + str3 + str4 + str5 + str6 ;
59
+ }
60
+
61
+ function text7 ( ) {
62
+ const str1 = "this7 is a lorem ipsum string" ;
63
+ const str2 = "this7 is not a lorem ipsum string" ;
64
+ const str3 = "this7 is not a lorem ipsum string2" ;
65
+ const str4 = "this7 is not a lorem ipsum string4" ;
66
+ const str5 = "this7 is not a lorem ipsum string5" ;
67
+ const str6 = "this7 is not a lorem ipsum string6" ;
68
+ return str1 + str2 + str3 + str4 + str5 + str6 ;
69
+ }
70
+
71
+ function text8 ( ) {
72
+ const str1 = "this8 is a lorem ipsum string" ;
73
+ const str2 = "this8 is not a lorem ipsum string" ;
74
+ const str3 = "this8 is not a lorem ipsum string2" ;
75
+ const str4 = "this8 is not a lorem ipsum string4" ;
76
+ const str5 = "this8 is not a lorem ipsum string5" ;
77
+ const str6 = "this8 is not a lorem ipsum string6" ;
78
+ return str1 + str2 + str3 + str4 + str5 + str6 ;
79
+ }
80
+
81
+ function text9 ( ) {
82
+ const str1 = "this9 is a lorem ipsum string" ;
83
+ const str2 = "this9 is not a lorem ipsum string" ;
84
+ const str3 = "this9 is not a lorem ipsum string2" ;
85
+ const str4 = "this9 is not a lorem ipsum string4" ;
86
+ const str5 = "this9 is not a lorem ipsum string5" ;
87
+ const str6 = "this9 is not a lorem ipsum string6" ;
88
+ return str1 + str2 + str3 + str4 + str5 + str6 ;
89
+ }
90
+
91
+ function text10 ( ) {
92
+ const str1 = "this10 is a lorem ipsum string" ;
93
+ const str2 = "this10 is not a lorem ipsum string" ;
94
+ const str3 = "this10 is not a lorem ipsum string2" ;
95
+ const str4 = "this10 is not a lorem ipsum string4" ;
96
+ const str5 = "this10 is not a lorem ipsum string5" ;
97
+ const str6 = "this10 is not a lorem ipsum string6" ;
98
+ return str1 + str2 + str3 + str4 + str5 + str6 ;
99
+ }
100
+
101
+ const jsObjs = [ ] ;
102
+
103
+ for ( let i = 0 ; i < 1_00_000 ; i ++ ) {
104
+ const jsObj = new text1 ( ) ;
105
+ jsObjs . push ( jsObj ) ;
106
+ }
107
+ for ( let i = 0 ; i < 1_00_000 ; i ++ ) {
108
+ const jsObj = new text2 ( ) ;
109
+ jsObjs . push ( jsObj ) ;
110
+ }
111
+ for ( let i = 0 ; i < 1_00_000 ; i ++ ) {
112
+ const jsObj = new text3 ( ) ;
113
+ jsObjs . push ( jsObj ) ;
114
+ }
115
+ for ( let i = 0 ; i < 1_00_000 ; i ++ ) {
116
+ const jsObj = new text4 ( ) ;
117
+ jsObjs . push ( jsObj ) ;
118
+ }
119
+ for ( let i = 0 ; i < 1_00_000 ; i ++ ) {
120
+ const jsObj = new text5 ( ) ;
121
+ jsObjs . push ( jsObj ) ;
122
+ }
123
+ for ( let i = 0 ; i < 1_00_000 ; i ++ ) {
124
+ const jsObj = new text6 ( ) ;
125
+ jsObjs . push ( jsObj ) ;
126
+ }
127
+ for ( let i = 0 ; i < 1_00_000 ; i ++ ) {
128
+ const jsObj = new text7 ( ) ;
129
+ jsObjs . push ( jsObj ) ;
130
+ }
131
+ for ( let i = 0 ; i < 1_00_000 ; i ++ ) {
132
+ const jsObj = new text8 ( ) ;
133
+ jsObjs . push ( jsObj ) ;
134
+ }
135
+ for ( let i = 0 ; i < 1_00_000 ; i ++ ) {
136
+ const jsObj = new text9 ( ) ;
137
+ jsObjs . push ( jsObj ) ;
138
+ }
139
+
140
+ for ( let i = 0 ; i < 1_00_000 ; i ++ ) {
141
+ const jsObj = new text10 ( ) ;
142
+ jsObjs . push ( jsObj ) ;
143
+ }
144
+
145
+ console . log ( "Objects created with function. Total function objects\t" , jsObjs . length ) ;
0 commit comments