diff --git a/efp/efp-x/main.xml b/efp/efp-x/main.xml new file mode 100644 index 0000000..5ae5f51 --- /dev/null +++ b/efp/efp-x/main.xml @@ -0,0 +1,63 @@ + + + + + + + + +
+ +

+ Strings are useful and extensive in several circumstances, but sometimes it may introduce + unnecessary burdens and overheads in different aspects. Conditions must have to be met + before adapting string resources in codebase. +

+
+
+
+ +

+ If the resources are planned to be located within code, as hardcoded resources, + it typically serves no advantages but disadvantages. +

+

+ Programmatically created resources should be more intuitive and faster than + parsing string for deserialization. +

+

+ If the formation of resources is not trivial, object builders could be utilized for + advanced construction of objects. Unless the structure of resources are highly bound + to the formation of literals, like Regular Expressions, there is no reason to stringify + resources in code. +

+
+
+
+ +

+ Sometimes, resources may be stored in a hashmap, keyed by strings. However, accessing + resources using string keys is more expensive than directly using object references, + despite the computational complexity of O(log n). +

+

+ Sometimes, string keys may be stored for later references using a hashmap. However, + the memory usage and hashing computations could be significant when in hot calls. +

+

+ Therefore, when applicable, one should always opt to use object references when + there is no special reason of using a string key. +

+
+
+
+ + +
  • EFP 3
  • +
    +
    +
    + +