avk959 / LGenerics

Generic algorithms and data structures for Lazarus/Free Pascal
Apache License 2.0
113 stars 16 forks source link

Text files in the repo with performance tests (vs other libraries) #8

Closed Alexey-T closed 2 years ago

Alexey-T commented 3 years ago

Ca you add such .txt files to repo? I am interested in JSON only-- but other tests are good as well...

avk959 commented 3 years ago

Look in the example/json folder.

Alexey-T commented 3 years ago

maybe also put the resulting .txt logs there, so I don't need to run them?

avk959 commented 3 years ago

I've added a typical parsing benchmark result(in parse_bench2), and the rest have already been posted on the forum.

Alexey-T commented 3 years ago

Only on forum? why not to put to GitHub as well, so people will find them.

avk959 commented 3 years ago

It's certainly not difficult for me to add them(already added), but it would be much more interesting for me if you could run them on your machine and share the results.

avk959 commented 3 years ago

Currently when inserting a list of name/value pairs, TJsonConf will raise an exception when trying to insert a duplicate name. Maybe it makes sense to introduce an option such that when it is activated, the value will simply be overwritten?

Alexey-T commented 3 years ago

What api are u talking about, SetValue with the existing key? What insert ?

Alexey-T commented 3 years ago

If u are talking about SetValue with some conflict of keys-- pls test it on Fpjson and mimic its behavior.

avk959 commented 3 years ago

I meant this method: procedure SetValue (const aPath: string; aValue: TStrings; AsObject: Boolean = False);
when AsObject set to True.

Alexey-T commented 3 years ago

It should overwrite old value.

avk959 commented 3 years ago

TJsonConfig currently raises an exception in this situation. The default behavior of TJsonConf will be the same, but I added an option that when activated, the values of the encountered duplicate names will be silently overwritten.

Alexey-T commented 3 years ago

Good, thanks! I am busy now so will test it later. good job.

avk959 commented 2 years ago

Hmm, not even half a year has passed.