These functions do not even call the database each time they are run. It just pulls them off the current post object that was returned by the database query that retrieved the posts. There’s nothing to optimise here.
get_the_ID() and get_the_title() literally just return $post->ID and $post->post_title. get_permalink() is a little bit more complicated, because it needs to do logic to figure out what the URL should be, based on permalink settings etc., but it doesn’t require additional database calls.
WordPress is not so poorly optimised that you need to do anything about these functions. If it’s how the documentation tells you how to do it, and it’s how the default themes work, then it’s fine.
If you’re concerned about the speed of your site, then install Query Monitor and at least check what queries are actually being made before deciding on a target.
Related Posts:
- Steps to optimize WordPress in regard to server load and website speed?
- Website is slow: advice on optimization
- Speeding Up Bulk Post Creation – wp_insert_post & update_post_meta
- How to properly insert a stylesheet in wp_head
- Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
- Could a higher number of registered image sizes affect performance?
- Page taking time in loading. Also used lazy loading but doesn’t work?
- Optimizing site speed by localizing paths
- High traffic management in WP
- admin.php taking 14 seconds
- How to optimize recaptcha__en.js
- How can I optimize my website for improved speed? [closed]
- Measure the time it takes to execute a t-sql query
- How can you profile a Python script?
- Which Python memory profiler is recommended? [closed]
- What is the best way to profile javascript execution?
- How to parallelize downloads across hostnames on WordPress?
- How well does WordPress scale?
- What are the best practices for using a caching plugin on a shared host?
- What’s the difference between wp_insert_user() and wp_create_user()
- How to fix wordpress slow first time load (Local Server)?
- What’s the ideal way to profile WordPress memory usage?
- WordPress SLOW, tried everything!
- W3 Leverage browser caching not working for google pagespeed [closed]
- WordPress so slow to load on MAMP
- get_adjacent_post alternative on a very large db
- Refresh external feeds only in cron?
- Any reason why wp_cache_set not to work?
- Will removing revisions positively impact database performance?
- Extremely slow WordPress website with 6000 posts
- In terms of performance – Is unmanaged VPS better than a managed one – for WP sites?
- How can WordPress be made more memory efficient?
- Get Y random authors’ ID/Object with more than X number of posts
- Localization / textdomain is slow and chaotic
- Defer Code in Widgets – Page Speed
- Disable Outbound Web Requests
- WordPress performance issue. Can I debug it?
- How much will mounting wp-content on a separate NFS server impact performance?
- Image Preloading
- Performance impact of using global $post
- WordPress site is sloooow, but admin is fast….any ideas?
- WordPress Scalability – One Instance or Several?
- Improve wp query perfomance on large db
- What Is The Best Method/Tool To Investigate WordPress Internal Performance?
- Is post_class(); going to slow WordPress page speed
- cross-host benchmarking with wordpress
- Performance problem with first load
- WordPress Caching On Demand
- Is there a real benefit in using wordpress optimized hosting?
- What is better to use, user meta, custom taxonomies or new database structure? [closed]
- How to disable Vary cache header on W3Total Cache plugin [closed]
- How to preload images through Code Snippets wp_head for specific pages?
- Improve performance by removing unnecessary database queries
- Native Lazy Loading on Safari
- Is it possible to make WordPress PHP faster through caching or compiling it?
- Identify running process that constantly use 5% CPU
- W3 Total Cache: use cache for request with ignorable query string [closed]
- Debugging high CPU usage during periods of inactivity
- How accurate is P3 Plugin profiler
- WordPress as framework
- How to optimize on-the-fly theme switching for mobile browsers?
- Timezone is wrong when picking city (Copenhagen)
- Site loading extremely slowly
- How to check performance of WordPress dashboard
- Horrendously slow admin and pretty slow sites [closed]
- Server technical information and first respond time for WordPress
- Avoid loading Facebook buttons and statistics multiple times
- Performance testing a WordPress site locally?
- Speed optimization on WP site, Remove query strings from static resources [duplicate]
- Offloading cron jobs
- How do you make a site load faster when offloading is not an option?
- how to embed Pdf and Video Without effecting page speed?
- My blog load time on Bluehost and Word press is too much. I have slipped in Google Search Ranking
- WordPress is very slow, even it’s not opening sometimes
- Faster Emails with WP Mail
- What could explain an extremely high TTFB (~20-30s) when not logged in, but then drastically reduced when logged in?
- Page flashes/flickers on every page load
- How can I figure out what is making my WordPress site so slow?
- “edit page” not loading
- Change loading order of blocks
- Can lots of tags affect performance?
- wp_set_post_terms() seems very slow
- Why are the latest visits to my website originating from my own website?
- wp_get_attachment_image_src() regenerate custom size images everytime
- Why is the server response time slowing my site down? [closed]
- Control load order?
- How to handle high load of traffic of my server
- How to preload the entire site with javascript?
- How to improve my site’s loading time?
- Is there a way to pass google webmaster CLS on WordPress website?
- Site load time increased
- WordPress and TTFB (time to first byte) stats
- Too many index.php files running and eating up all memory
- What’s a good tool for speed benchmarking? [closed]
- WordPress system (hardware) requirements?
- How much server power does Worldpress take? [closed]
- JS/CSS duplicate load and 404 Error [closed]
- How can a single disk in a hardware SATA RAID-10 array bring the entire array to a screeching halt?
- Optimise page loading time faster on WordPress using Genesis child theme [closed]
- How to add fetchpriority to first 2 images in wordpress?