julkas
-
Content Count
44 -
Joined
-
Last visited
Posts posted by julkas
-
-
Delphi 10.3 Community Edition
$ dcc32 --version dcc (Embarcadero Delphi for Windows) 33.0 Embarcadero Delphi for Win32 compiler version 33.0 Copyright (c) 1983,2018 Embarcadero Technologies, Inc. $ dcc64 --version dcc (Embarcadero Delphi for Windows) 33.0 Embarcadero Delphi for Win64 compiler version 33.0 Copyright (c) 1983,2018 Embarcadero Technologies, Inc.
-
On 12/17/2021 at 7:56 PM, TimCruise said:I am new to Pascal.
If it is for learning - try Pascal.
-
Difficult question. Revise your project requirements.
Don't forget CI, maintenance, community support, open source ...
C or Pascal, front-end or back-end, firmware or UI, storage?Can you give more info about project?
-
-
UPDATE mytable SET DOCNO = CAST(CONCAT('21', DOCNO) AS INT)
-
-
-
11 hours ago, Stefan Glienke said:An impressive number of implemented collections for sure but it's only compatible with FreePascal and from a quick look you won't easily make that code Delphi compatible.
But thanks for mentioning it - I will certainly run some benchmarks to compare.
-
-
22 hours ago, Mike Torrettinni said:That is interesting. Do you use it, for what cases you prefer using it?
I can't find Delphi implementation. Do you know does it exist?
There is no ready to use Pascal implementation 😞 . You can start / take ideas from existing C++ & Java code and create good (without remove/delete 😞) ordered set or order statistics set (array bisection algorithm may be helpful) Object Pascal class.
-
On 3/6/2021 at 2:32 PM, Mike Torrettinni said:I'm refactoring usage of various different look-up tables and I'm trying to come with 1 fast look-up table design. Most of them have 1 thing in common: search by integer (ID) and search by string (Name).
All data is sorted.
So, I bench-marked TArray.BinarySearch, TDictionary and custom binary search.
Even though a flaw in design was pointed out for TArray.BinarySearch, (see https://en.delphipraxis.net/topic/4575-why-is-tarraybinarysearch-slower-than-normal-binary-search-function/), I still wanted to compare results:
For search by integer, custom binary search seems to be a little faster than TDictionary, until large tables:
For search by string, custom binary search wins even more, still for not large tables:
Interesting is that for smaller searches, 10 records, a sequential search is faster than TDictionary.
I also tried TGpStringHash (by Primoz Gabrielcic), which is very fast, but unfortunately no implementation for integers.
TSynDictionary (from mORMot) is also very fast, but I don't use mORMotand license is not friendly for my commercial project.
Is there any other fast search implementations that is not too specialized and ready to use out of the box, that I can try?
Take a look - Binary Array Set. Rare, but very useful data structure.
- 1
-
On 4/28/2021 at 10:28 AM, Tommi Prami said:Could someone point into nice implementation?
Would be nice (but not 100% necessary) that would have similar functionality than RTL version have. More than less drop in replacement (Easy to port)-Tee-
OK, it depends. Anyway, I suggest - xoshiro / xoroshiro generators
Or 🙂 start with simple SplitMix64
-
For parameters you can use const or var qualifiers (option - declare absolute).
For return - use generic pointer.
See - Parameters
Pascal is a strongly typed. :-). https://ideone.com/5r1Uqf
-
See - https://github.com/kandiral/Kandiral/tree/master/Automation
Check also - http://www.pascalscada.com/ (I don't know about Delphi support).
-
Updates: added prime tuplets iterator (2, 3, ..., 6).
-
-
-
2 hours ago, David Heffernan said:Can it play chess well? Or is it interesting because it's Pascal?
It's old chess engine written in Turbo Pascal.
It's good for beginners and not only. You can increase / decrease engine default thinking time with + / -. Executable created on Windows 10 with Delphi Community Edition is in the folder Delphi.
So just enjoy chess and power of great Turbo Pascal.
I think it's clear.
-
-
Another generics collection (with TimSort) - https://github.com/avk959/LGenerics
I don't know about Delphi support.
-
Interesting.
BTW I use always Merge Sort and Tim Sort.
- 1
-
6 hours ago, Marat1961 said:Where will your code in the procedure be faster than the same code generated by the compiler.
As far as I understand, the functionality of the code is the same, but the overhead of calling the procedure is added.
As a result, if we calculate everything, we lose in performance.
Thanks all for replies.
Please see question - https://www.quora.com/What-are-the-10-biggest-prime-numbers-below-2-64
Here is my last solution - https://ideone.com/oO83MV
Can you do it faster using only Miller Rabin test?
If - yes,, provide your solution.
BTW - My pure Object Pascal implementation is here - https://github.com/JulStrat/primesieve-pas/blob/mult/mult/modar.pas
-
Any plans for PyPy JIT compiler support?
Best regards.
-
On 10/29/2020 at 5:45 PM, Marat1961 said:Gigo. Garbage at the input garbage at the output.
OK. Please provide example of a, b, m (m <> 0) where my last solution is wrong.
Pascal bindings for PrimeSieve library
in I made this
Posted
v0.5.1 is out.