Search found 161 matches

by pjay
Wed Apr 17, 2024 10:21 am
Forum: Coding Questions
Topic: Variability in Pack size with optimised code
Replies: 4
Views: 409

Re: Variability in Pack size with optimised code

As long as you have write access to the files then you could use the SetFileDate() function just before you pack each of them: UseLZMAPacker() UseSHA1Fingerprint() OpenConsole() Define.i pkhnd file_output.s = "C:\Temp\TestPack_ConstantAccessDate.lzma" file1.s = "C:\Program Files\PureB...
by pjay
Tue Apr 16, 2024 5:49 pm
Forum: Coding Questions
Topic: Variability in Pack size with optimised code
Replies: 4
Views: 409

Re: Variability in Pack size with optimised code

My guess is it's due to the LZMA storing the file date metadata. This metadata contains an 'accessed date' field, which will change every time you add the file & could therefore be compressing slightly differently each time a second ticks past.
by pjay
Mon Apr 15, 2024 8:23 am
Forum: Coding Questions
Topic: Debug mode execution speed can vary on source whitespace.
Replies: 12
Views: 742

Re: Debug mode execution speed can vary on source whitespace.

You can compare the asm output with --commented to see if there is anything odds. Could be an extra debuggercheck() Did this for both asm and c output and didn't see any additional calls. I think the issue may be linked to the debugger interaction with the IDE, as I re-ran the executables generated...
by pjay
Sun Apr 14, 2024 9:34 am
Forum: Coding Questions
Topic: Debug mode execution speed can vary on source whitespace.
Replies: 12
Views: 742

Re: Debug mode execution speed can vary on source whitespace.

Thanks for testing - It may be that it's system architecture dependant; I'm on an AMD laptop here (5800h, Windows 11 x64)

I appreciate that it doesn't matter a great deal, as it only appears to influence the debugging side of things, but it could be beneficial to understand what’s causing it.
by pjay
Sat Apr 13, 2024 8:36 am
Forum: Coding Questions
Topic: Debug mode execution speed can vary on source whitespace.
Replies: 12
Views: 742

Re: Debug mode execution speed can vary on source whitespace.

Example code. Running with v6.10, C compiler, optimizations enabled, threadsafe enabled & debugger enabled: ~43ms per frame when Render_Thread() is on line 50. ~29ms per frame when Render_Thread() is on line 41. ;/ Phil James 08/2023 - Pixel shader on CPU - Optimized. ;/ - Taken from 'An introdu...
by pjay
Sat Apr 13, 2024 8:03 am
Forum: Coding Questions
Topic: Debug mode execution speed can vary on source whitespace.
Replies: 12
Views: 742

Debug mode execution speed can vary on source whitespace.

[Win 11, X64, PB v6.0+, C & ASM] - Threadsafe enabled as multi-threaded application. I'm witnessing an oddity whereby simply adding whitespace in front of a procedure that's called with CreateThread() can vary its execution speed by as much as 60% whilst in debug mode. I can't post the code i'm ...
by pjay
Sun Apr 07, 2024 11:37 am
Forum: Coding Questions
Topic: Find two strings (in *memory)...
Replies: 8
Views: 427

Re: Find two strings (in *memory)...

Is the text file small enough to fit in memory in one go?
by pjay
Fri Apr 05, 2024 6:18 pm
Forum: 3D Programming
Topic: Totally lost at rotating an object
Replies: 6
Views: 249

Re: Totally lost at rotating an object

If you wanted to do this without caching the xy rotations then you probably need to use the entity pitch(), roll() and yaw() commands seperately, along with 3 seperate RotateEntity() commands (much like in legacy OpenGL). I see you've already figured out the 180 deg thing, but if you wanted to snap ...
by pjay
Fri Apr 05, 2024 4:59 pm
Forum: 3D Programming
Topic: Totally lost at rotating an object
Replies: 6
Views: 249

Re: Totally lost at rotating an object

EntityPitch() & EntityYaw() I think - I initially tried with EntityDirectionX/Y() but it wasn't right.
by pjay
Fri Apr 05, 2024 3:58 pm
Forum: 3D Programming
Topic: Totally lost at rotating an object
Replies: 6
Views: 249

Re: Totally lost at rotating an object

I'd do it this way: EnableExplicit Define.f entity_rotationx.f, entity_rotationy.f, reset.f, resetspeed.f = 0.005 If InitEngine3D(#PB_Engine3D_NoLog) If InitKeyboard() And InitMouse() And InitSprite() OpenWindow(0,0,0,800,600,"Test",#PB_Window_ScreenCentered) OpenWindowedScreen(WindowID(0)...
by pjay
Wed Apr 03, 2024 8:48 pm
Forum: Coding Questions
Topic: Scary keyboard behaviour with 3D !
Replies: 2
Views: 164

Re: Scary keyboard behaviour with 3D !

Isn't this because you've used #PB_Key_Up twice in your if statement?
by pjay
Tue Apr 02, 2024 9:23 am
Forum: Announcement
Topic: PureBasic 6.10 LTS is out !
Replies: 330
Views: 41265

Re: PureBasic 6.10 LTS is out !

Thanks for the update Fred & team. :) I struggle to understand the concern over growing executable sizes - surely the issue is completely irrelevant in the age of tb storage & fast internet? Are the complainants still using floppy disks for their backups? :lol: Purposefully limiting the exec...
by pjay
Thu Mar 28, 2024 7:56 am
Forum: Tricks 'n' Tips
Topic: atomic web server threads
Replies: 75
Views: 4736

Re: atomic web server threads

Thanks, I think I may have a use for this in the very near future.

You post so much useful code; I'm sure others have said before, but 'Idle' is not the correct username for someone so productive :lol:
by pjay
Thu Mar 28, 2024 7:44 am
Forum: Coding Questions
Topic: What is the maximum length a string variable can hold?
Replies: 15
Views: 519

Re: What is the maximum length a string variable can hold?

mk-soft was right when he said "I think unlimited means a meaningful range". Unlimited should not be taken literally & is perhaps not the best terminology to use, there are always limits. Personally, I think anyone who's using a gigabytes worth of singular string data should be taking ...
by pjay
Wed Mar 27, 2024 11:14 pm
Forum: Coding Questions
Topic: What is the maximum length a string variable can hold?
Replies: 15
Views: 519

Re: What is the maximum length a string variable can hold?

The 2gb limit of WriteData() is documented - you can use multiple writes to overcome it.